| 1 |
""" |
| 2 |
cloud_sptheme setup script |
| 3 |
""" |
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
import os |
| 8 |
root_dir = os.path.abspath(os.path.join(__file__, "..")) |
| 9 |
os.chdir(root_dir) |
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
import setuptools |
| 16 |
import sys |
| 17 |
|
| 18 |
from cloud_sptheme import _iter_theme_sources |
| 19 |
from cloud_sptheme import __version__ as version |
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
opts = dict( |
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
packages=setuptools.find_packages(root_dir), |
| 29 |
package_data={ |
| •30 |
"cloud_sptheme": ["ext/static/*.*"], |
| 31 |
}, |
| 32 |
zip_safe=False, |
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
name="cloud_sptheme", |
| 38 |
|
| 39 |
author="Eli Collins", |
| 40 |
author_email="[email protected]", |
| 41 |
license = "BSD", |
| 42 |
|
| 43 |
url = "https://cloud-sptheme.readthedocs.io", |
| 44 |
download_url = "https://pypi.python.org/pypi/cloud_sptheme", |
| 45 |
|
| 46 |
install_requires=[ |
| 47 |
"sphinx>=1.6" |
| 48 |
], |
| 49 |
|
| 50 |
entry_points={ |
| 51 |
|
| 52 |
"sphinx.html_themes": ['%s = cloud_sptheme' % name for name, path in _iter_theme_sources()] |
| 53 |
}, |
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
description= |
| 59 |
"a nice sphinx theme named 'Cloud', and some related extensions", |
| 60 |
|
| 61 |
long_description="""\ |
| 62 |
This is a small package containing a Sphinx theme named "Cloud", |
| 63 |
along with some related Sphinx extensions. To see an example |
| 64 |
of the theme in action, check out it's documentation |
| 65 |
at `<https://cloud-sptheme.readthedocs.io>`_. |
| 66 |
""", |
| 67 |
|
| 68 |
keywords="sphinx extension theme", |
| 69 |
|
| 70 |
classifiers=""" |
| 71 |
Development Status :: 5 - Production/Stable |
| 72 |
Framework :: Sphinx :: Extension |
| 73 |
Framework :: Sphinx :: Theme |
| 74 |
Intended Audience :: Developers |
| 75 |
License :: OSI Approved :: BSD License |
| 76 |
Operating System :: OS Independent |
| 77 |
Programming Language :: Python :: 2.6 |
| 78 |
Programming Language :: Python :: 2.7 |
| 79 |
Programming Language :: Python :: 3 |
| 80 |
Programming Language :: Python :: 3.3 |
| 81 |
Programming Language :: Python :: 3.4 |
| 82 |
Programming Language :: Python :: 3.5 |
| 83 |
Programming Language :: Python :: 3.6 |
| 84 |
Programming Language :: Python :: 3.7 |
| 85 |
Programming Language :: Python :: 3.8 |
| 86 |
Topic :: Documentation |
| 87 |
Topic :: Software Development :: Documentation |
| 88 |
""".strip().splitlines(), |
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
script_args=sys.argv[1:], |
| 94 |
cmdclass={}, |
| 95 |
) |
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
stamp_build = False |
| 103 |
if stamp_build: |
| 104 |
from cloud_sptheme._setup.stamp import ( |
| 105 |
as_bool, append_hg_revision, stamp_distutils_output, |
| 106 |
install_build_py_exclude, set_command_options |
| 107 |
) |
| 108 |
|
| 109 |
|
| 110 |
if as_bool(os.environ.get("SETUP_TAG_RELEASE", "yes")): |
| 111 |
version = append_hg_revision(version) |
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
stamp_distutils_output(opts, version) |
| 116 |
|
| 117 |
|
| 118 |
install_build_py_exclude(opts) |
| 119 |
set_command_options(opts, "build_py", |
| 120 |
exclude_packages=["cloud_sptheme._setup"], |
| 121 |
) |
| 122 |
|
| 123 |
opts['version'] = version |
| 124 |
|
| 125 |
|
| 126 |
|
| 127 |
|
| 128 |
setuptools.setup(**opts) |
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
|