From fc3df83d39b63d3a67db7650e858d92803cb1033 Mon Sep 17 00:00:00 2001 From: Joffrey F Date: Fri, 30 Nov 2018 17:59:55 -0800 Subject: [PATCH] Update setup.py for modern pypi /setuptools Remove pandoc dependencies Signed-off-by: Joffrey F --- MANIFEST.in | 3 +-- script/release/push-release | 8 -------- script/release/release.py | 4 ---- script/release/setup-venv.sh | 2 +- setup.py | 17 ++++++++++++----- 5 files changed, 14 insertions(+), 20 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 8c6f932ba..fca685eaa 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -4,8 +4,7 @@ include requirements.txt include requirements-dev.txt include tox.ini include *.md -exclude README.md -include README.rst +include README.md include compose/config/*.json include compose/GITSHA recursive-include contrib/completion * diff --git a/script/release/push-release b/script/release/push-release index 0578aaff8..f28c1d4fe 100755 --- a/script/release/push-release +++ b/script/release/push-release @@ -26,12 +26,6 @@ if [ -z "$(command -v jq 2> /dev/null)" ]; then 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 REPO=docker/compose GITHUB_REPO=git@github.com:$REPO @@ -59,8 +53,6 @@ docker push docker/compose-tests:latest docker push docker/compose-tests:$VERSION 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 python setup.py sdist bdist_wheel if [ "$(command -v twine 2> /dev/null)" ]; then diff --git a/script/release/release.py b/script/release/release.py index 6574bfddd..63bf863df 100755 --- a/script/release/release.py +++ b/script/release/release.py @@ -9,7 +9,6 @@ import sys import time from distutils.core import run_setup -import pypandoc from jinja2 import Template from release.bintray import BintrayAPI from release.const import BINTRAY_ORG @@ -277,9 +276,6 @@ def finalize(args): 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']) merge_status = pr_data.merge() diff --git a/script/release/setup-venv.sh b/script/release/setup-venv.sh index 780fc800f..ab419be0c 100755 --- a/script/release/setup-venv.sh +++ b/script/release/setup-venv.sh @@ -39,9 +39,9 @@ fi $VENV_PYTHONBIN -m pip install -U Jinja2==2.10 \ PyGithub==1.39 \ - pypandoc==1.4 \ GitPython==2.1.9 \ requests==2.18.4 \ + setuptools==40.6.2 \ twine==1.11.0 $VENV_PYTHONBIN setup.py develop diff --git a/setup.py b/setup.py index 9efc642c4..4c49bab7b 100644 --- a/setup.py +++ b/setup.py @@ -77,19 +77,26 @@ setup( name='docker-compose', version=find_version("compose", "__init__.py"), description='Multi-container orchestration for Docker', + long_description=read('README.md'), + long_description_content_type='text/markdown', 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.', license='Apache License 2.0', packages=find_packages(exclude=['tests.*', 'tests']), include_package_data=True, - test_suite='nose.collector', install_requires=install_requires, extras_require=extras_require, tests_require=tests_require, - entry_points=""" - [console_scripts] - docker-compose=compose.cli.main:main - """, + python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*', + entry_points={ + 'console_scripts': ['docker-compose=compose.cli.main:main'], + }, classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Console',