Skip to content

Commit 1125004

Browse files
authored
Merge pull request #2193 from docker/update_setup_py
Update setup.py for modern pypi / setuptools
2 parents 5c74846 + 3381f7b commit 1125004

File tree

2 files changed

+12
-15
lines changed

2 files changed

+12
-15
lines changed

scripts/release.sh

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@
33
# Create the official release
44
#
55

6-
if [ -z "$(command -v pandoc 2> /dev/null)" ]; then
7-
>&2 echo "$0 requires http://pandoc.org/"
8-
>&2 echo "Please install it and make sure it is available on your \$PATH."
9-
exit 2
10-
fi
11-
126
VERSION=$1
137
REPO=docker/docker-py
148
@@ -37,11 +31,10 @@ if [[ $2 == 'upload' ]]; then
3731
fi
3832

3933

40-
pandoc -f markdown -t rst README.md -o README.rst || exit 1
4134
echo "##> sdist & wheel"
4235
python setup.py sdist bdist_wheel
4336

4437
if [[ $2 == 'upload' ]]; then
4538
echo '##> Uploading sdist to pypi'
4639
twine upload dist/docker-$VERSION*
47-
fi
40+
fi

setup.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,24 +55,27 @@
5555

5656

5757
long_description = ''
58-
try:
59-
with codecs.open('./README.rst', encoding='utf-8') as readme_rst:
60-
long_description = readme_rst.read()
61-
except IOError:
62-
# README.rst is only generated on release. Its absence should not prevent
63-
# setup.py from working properly.
64-
pass
58+
with codecs.open('./README.md', encoding='utf-8') as readme_md:
59+
long_description = readme_md.read()
6560

6661
setup(
6762
name="docker",
6863
version=version,
6964
description="A Python library for the Docker Engine API.",
7065
long_description=long_description,
66+
long_description_content_type='text/markdown',
7167
url='https://github.com/docker/docker-py',
68+
project_urls={
69+
'Documentation': 'https://docker-py.readthedocs.io',
70+
'Changelog': 'https://docker-py.readthedocs.io/en/stable/change-log.html', # flake8: noqa
71+
'Source': 'https://github.com/docker/docker-py',
72+
'Tracker': 'https://github.com/docker/docker-py/issues',
73+
},
7274
packages=find_packages(exclude=["tests.*", "tests"]),
7375
install_requires=requirements,
7476
tests_require=test_requirements,
7577
extras_require=extras_require,
78+
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*',
7679
zip_safe=False,
7780
test_suite='tests',
7881
classifiers=[
@@ -89,6 +92,7 @@
8992
'Programming Language :: Python :: 3.5',
9093
'Programming Language :: Python :: 3.6',
9194
'Programming Language :: Python :: 3.7',
95+
'Topic :: Software Development',
9296
'Topic :: Utilities',
9397
'License :: OSI Approved :: Apache Software License',
9498
],

0 commit comments

Comments
 (0)