Merge pull request #6389 from docker/6386-update-setup-py

Update setup.py for modern pypi /setuptools
This commit is contained in:
Joffrey F 2018-12-04 13:22:41 -08:00 committed by GitHub
commit 64633a81cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 20 deletions

View File

@ -4,8 +4,7 @@ include requirements.txt
include requirements-dev.txt include requirements-dev.txt
include tox.ini include tox.ini
include *.md include *.md
exclude README.md include README.md
include README.rst
include compose/config/*.json include compose/config/*.json
include compose/GITSHA include compose/GITSHA
recursive-include contrib/completion * recursive-include contrib/completion *

View File

@ -26,12 +26,6 @@ if [ -z "$(command -v jq 2> /dev/null)" ]; then
fi fi
if [ -z "$(command -v pandoc 2> /dev/null)" ]; then
>&2 echo "$0 requires http://pandoc.org/"
>&2 echo "Please install it and make sure it is available on your \$PATH."
exit 2
fi
API=https://api.github.com/repos API=https://api.github.com/repos
REPO=docker/compose REPO=docker/compose
GITHUB_REPO=git@github.com:$REPO GITHUB_REPO=git@github.com:$REPO
@ -59,8 +53,6 @@ docker push docker/compose-tests:latest
docker push docker/compose-tests:$VERSION docker push docker/compose-tests:$VERSION
echo "Uploading package to PyPI" echo "Uploading package to PyPI"
pandoc -f markdown -t rst README.md -o README.rst
sed -i -e 's/logo.png?raw=true/https:\/\/github.com\/docker\/compose\/raw\/master\/logo.png?raw=true/' README.rst
./script/build/write-git-sha ./script/build/write-git-sha
python setup.py sdist bdist_wheel python setup.py sdist bdist_wheel
if [ "$(command -v twine 2> /dev/null)" ]; then if [ "$(command -v twine 2> /dev/null)" ]; then

View File

@ -9,7 +9,6 @@ import sys
import time import time
from distutils.core import run_setup from distutils.core import run_setup
import pypandoc
from jinja2 import Template from jinja2 import Template
from release.bintray import BintrayAPI from release.bintray import BintrayAPI
from release.const import BINTRAY_ORG from release.const import BINTRAY_ORG
@ -277,9 +276,6 @@ def finalize(args):
repository.checkout_branch(br_name) repository.checkout_branch(br_name)
pypandoc.convert_file(
os.path.join(REPO_ROOT, 'README.md'), 'rst', outputfile=os.path.join(REPO_ROOT, 'README.rst')
)
run_setup(os.path.join(REPO_ROOT, 'setup.py'), script_args=['sdist', 'bdist_wheel']) run_setup(os.path.join(REPO_ROOT, 'setup.py'), script_args=['sdist', 'bdist_wheel'])
merge_status = pr_data.merge() merge_status = pr_data.merge()

View File

@ -39,9 +39,9 @@ fi
$VENV_PYTHONBIN -m pip install -U Jinja2==2.10 \ $VENV_PYTHONBIN -m pip install -U Jinja2==2.10 \
PyGithub==1.39 \ PyGithub==1.39 \
pypandoc==1.4 \
GitPython==2.1.9 \ GitPython==2.1.9 \
requests==2.18.4 \ requests==2.18.4 \
setuptools==40.6.2 \
twine==1.11.0 twine==1.11.0
$VENV_PYTHONBIN setup.py develop $VENV_PYTHONBIN setup.py develop

View File

@ -77,19 +77,26 @@ setup(
name='docker-compose', name='docker-compose',
version=find_version("compose", "__init__.py"), version=find_version("compose", "__init__.py"),
description='Multi-container orchestration for Docker', description='Multi-container orchestration for Docker',
long_description=read('README.md'),
long_description_content_type='text/markdown',
url='https://www.docker.com/', url='https://www.docker.com/',
project_urls={
'Documentation': 'https://docs.docker.com/compose/overview',
'Changelog': 'https://github.com/docker/compose/blob/release/CHANGELOG.md',
'Source': 'https://github.com/docker/compose',
'Tracker': 'https://github.com/docker/compose/issues',
},
author='Docker, Inc.', author='Docker, Inc.',
license='Apache License 2.0', license='Apache License 2.0',
packages=find_packages(exclude=['tests.*', 'tests']), packages=find_packages(exclude=['tests.*', 'tests']),
include_package_data=True, include_package_data=True,
test_suite='nose.collector',
install_requires=install_requires, install_requires=install_requires,
extras_require=extras_require, extras_require=extras_require,
tests_require=tests_require, tests_require=tests_require,
entry_points=""" python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
[console_scripts] entry_points={
docker-compose=compose.cli.main:main 'console_scripts': ['docker-compose=compose.cli.main:main'],
""", },
classifiers=[ classifiers=[
'Development Status :: 5 - Production/Stable', 'Development Status :: 5 - Production/Stable',
'Environment :: Console', 'Environment :: Console',