|
1 | | -import setuptools |
| 1 | +import os |
| 2 | + |
| 3 | +from setuptools import find_packages, setup |
2 | 4 |
|
3 | 5 | import versioneer |
4 | 6 |
|
| 7 | +rootpath = os.path.dirname(os.path.abspath(__file__)) |
| 8 | + |
5 | 9 |
|
6 | | -try: |
7 | | - with open('README.rst') as f: |
8 | | - long_description = f.read() |
9 | | -except IOError: |
10 | | - long_description = "" |
| 10 | +def read(*parts): |
| 11 | + return open(os.path.join(rootpath, *parts), "r").read() |
11 | 12 |
|
12 | 13 |
|
13 | | -setuptools.setup( |
14 | | - name='stdlib-list', |
15 | | - license='MIT', |
16 | | - author='Jack Maney', |
17 | | - author_email='jackmaney@gmail.com', |
18 | | - url='https://github.com/jackmaney/python-stdlib-list', |
| 14 | +setup( |
| 15 | + name="stdlib-list", |
| 16 | + license="MIT", |
| 17 | + author="Jack Maney", |
| 18 | + author_email="jackmaney@gmail.com", |
| 19 | + url="https://github.com/jackmaney/python-stdlib-list", |
19 | 20 | version=versioneer.get_version(), |
20 | | - install_requires=['functools32;python_version<"3.2"'], |
| 21 | + install_requires=["functools32;python_version<'3.2'"], |
21 | 22 | extras_require={"develop": ["sphinx"]}, |
22 | | - description='A list of Python Standard Libraries (2.6-7, 3.2-6).', |
23 | | - long_description=long_description, |
| 23 | + description="A list of Python Standard Libraries (2.6-7, 3.2-8).", |
| 24 | + long_description="{}".format(read("README.md")), |
| 25 | + long_description_content_type="text/markdown", |
24 | 26 | include_package_data=True, |
25 | | - packages=setuptools.find_packages(), |
| 27 | + packages=find_packages(), |
26 | 28 | cmdclass=versioneer.get_cmdclass(), |
27 | 29 | ) |
0 commit comments