-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
49 lines (42 loc) · 1.55 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# setup.py
from setuptools import setup
from distutils.util import convert_path
# from sphinx.setup_command import BuildDoc
name = 'ArgDoc'
main_ns = {}
ver_path = convert_path('argdoc/version.py')
with open(ver_path) as ver_file:
exec(ver_file.read(), main_ns)
with open('README.md', 'r') as rm:
long_description = rm.read()
cmdclass = {}
command_options = {}
try:
from sphinx.setup_command import BuildDoc
cmdclass['build_sphinx'] = BuildDoc
command_options['build_sphinx'] = {
'project': ('setup.py', name),
'version': ('setup.py', main_ns['__version__']),
'source_dir': ('setup.py', 'docs/source'),
'build_dir': ('setup.py', 'docs/build')}
except ImportError:
print('WARNING: sphinx not available, not building docs')
setup(name=name,
version=main_ns['__version__'],
author='Jeremy Solbrig',
author_email='[email protected]',
description='A package for reducing copy/paste of argument descriptions in docstrings',
long_description=long_description,
long_description_content_type="text/markdown",
setup_requires=['sphinx'],
install_requires=['future', 'sphinx', 'sphinxcontrib-programoutput'],
packages=['argdoc'],
cmdclass=cmdclass,
command_options=command_options,
url='https://github.com/jsolbrig/argdoc',
classifiers=[
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.7',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent']
)