1# -*- coding: utf-8 -*- 2import os 3from setuptools import setup, find_packages 4 5long_desc = ''' 6sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document. 7''' 8 9extras_require = { 10 'test': [ 11 'pytest', 12 ], 13 'lint': [ 14 'flake8', 15 'mypy', 16 'docutils-stubs', 17 ], 18} 19 20 21def get_version(): 22 """Get version number of the package from version.py without importing core module.""" 23 package_dir = os.path.abspath(os.path.dirname(__file__)) 24 version_file = os.path.join(package_dir, 'sphinxcontrib/devhelp/version.py') 25 26 namespace = {} 27 with open(version_file, 'rt') as f: 28 exec(f.read(), namespace) 29 30 return namespace['__version__'] 31 32 33setup( 34 name='sphinxcontrib-devhelp', 35 version=get_version(), 36 url='http://sphinx-doc.org/', 37 download_url='https://pypi.org/project/sphinxcontrib-devhelp/', 38 license='BSD', 39 author='Georg Brandl', 40 author_email='georg@python.org', 41 description=long_desc.strip().replace('\n', ' '), 42 long_description=long_desc, 43 zip_safe=False, 44 classifiers=[ 45 'Development Status :: 5 - Production/Stable', 46 'Environment :: Console', 47 'Environment :: Web Environment', 48 'Intended Audience :: Developers', 49 'Intended Audience :: Education', 50 'License :: OSI Approved :: BSD License', 51 'Operating System :: OS Independent', 52 'Programming Language :: Python', 53 'Programming Language :: Python :: 3', 54 'Programming Language :: Python :: 3.5', 55 'Programming Language :: Python :: 3.6', 56 'Programming Language :: Python :: 3.7', 57 'Framework :: Sphinx', 58 'Framework :: Sphinx :: Extension', 59 'Topic :: Documentation', 60 'Topic :: Documentation :: Sphinx', 61 'Topic :: Text Processing', 62 'Topic :: Utilities', 63 ], 64 platforms='any', 65 python_requires=">=3.5", 66 packages=find_packages(exclude=['tests']), 67 include_package_data=True, 68 extras_require=extras_require, 69 namespace_packages=['sphinxcontrib'], 70) 71