-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsetup.py
More file actions
45 lines (39 loc) · 1.22 KB
/
setup.py
File metadata and controls
45 lines (39 loc) · 1.22 KB
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
#!/usr/bin/python
import os
import re
from setuptools import setup
from m2r import parse_from_file
import restructuredtext_lint
# Parser README.md into reStructuredText format
rst_readme = parse_from_file('README.md')
# Validate the README, checking for errors
errors = restructuredtext_lint.lint(rst_readme)
# Raise an exception for any errors found
if errors:
print(rst_readme)
raise ValueError('README.md contains errors: ',
', '.join([e.message for e in errors]))
# Attempt to get version number from TravisCI environment variable
version = os.environ.get('TRAVIS_TAG', default='0.0.0')
# Remove leading 'v'
version = re.sub('^v', '', version)
setup(
name='auto-all',
description='Automatically manage __all__ variable in Python packages.',
long_description=rst_readme,
version=version,
author='Jon Grace-Cox',
author_email='jongracecox@gmail.com',
py_modules=['auto_all'],
setup_requires=['setuptools', 'wheel'],
tests_require=['unittest'],
install_requires=[],
data_files=[],
options={
'bdist_wheel': {'universal': True}
},
url='https://github.com/jongracecox/auto-all',
classifiers=[
'License :: OSI Approved :: MIT License'
]
)