From 2a51fdc3e374042a79a8cbc9d56a2e5a83d77ce2 Mon Sep 17 00:00:00 2001 From: Alexey Stepanov Date: Fri, 8 Jun 2018 10:20:53 +0200 Subject: [PATCH 1/2] Update requirements and metadata typing: python <3.8 (due to still not completed) setup_requires & python_requires in setup.py due to old setuptools logic project_urls for packaging --- README.rst | 2 +- requirements.txt | 2 +- setup.cfg | 11 ----------- setup.py | 14 ++++++++++++++ 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/README.rst b/README.rst index b85a127..6429ccf 100644 --- a/README.rst +++ b/README.rst @@ -6,7 +6,7 @@ threaded .. image:: https://coveralls.io/repos/github/python-useful-helpers/threaded/badge.svg?branch=master :target: https://coveralls.io/github/python-useful-helpers/threaded?branch=master .. image:: https://readthedocs.org/projects/threaded/badge/?version=latest - :target: http://threaded.readthedocs.io/ + :target: https://threaded.readthedocs.io/ :alt: Documentation Status .. image:: https://img.shields.io/pypi/v/threaded.svg :target: https://pypi.python.org/pypi/threaded diff --git a/requirements.txt b/requirements.txt index 94863e0..a7aecab 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ six >=1.10.0 -typing >= 3.6 ; python_version < "3.7" +typing >= 3.6 ; python_version < "3.8" diff --git a/setup.cfg b/setup.cfg index 998f32c..efe55ed 100644 --- a/setup.cfg +++ b/setup.cfg @@ -5,17 +5,6 @@ name = threaded zip_safe = False packages = find: -# While setuptools cannot deal with pre-installed incompatible versions, -# setting a lower bound is not harmful - it makes error messages cleaner. DO -# NOT set an upper bound on setuptools, as that will lead to uninstallable -# situations as progressive releases of projects are done. -# Blacklist setuptools 34.0.0-34.3.2 due to https://github.com/pypa/setuptools/issues/951 -# Blacklist setuptools 36.2.0 due to https://github.com/pypa/setuptools/issues/1086 -setup_requires = - setuptools >= 21.0.0,!=24.0.0,!=34.0.0,!=34.0.1,!=34.0.2,!=34.0.3,!=34.1.0,!=34.1.1,!=34.2.0,!=34.3.0,!=34.3.1,!=34.3.2,!=36.2.0 - -python_requires = >=2.7.5,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.* - [bdist_wheel] # This flag says that the code is written to work on both Python 2 and Python # 3. If at all possible, it is good practice to do this. If you cannot, you diff --git a/setup.py b/setup.py index 0f2d8eb..bdfd0a6 100644 --- a/setup.py +++ b/setup.py @@ -249,12 +249,26 @@ def get_simple_vars_from_src(src): for name, email in variables['__maintainers__'].items() ), url=variables['__url__'], + project_urls={ + "Bug Tracker": "https://github.com/python-useful-helpers/threaded/issues", + "Documentation": "https://threaded.readthedocs.io/", + }, version=variables['__version__'], license=variables['__license__'], description=variables['__description__'], long_description=long_description, classifiers=classifiers, keywords=keywords, + python_requires='>=2.7.5,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*', + # While setuptools cannot deal with pre-installed incompatible versions, + # setting a lower bound is not harmful - it makes error messages cleaner. DO + # NOT set an upper bound on setuptools, as that will lead to uninstallable + # situations as progressive releases of projects are done. + # Blacklist setuptools 34.0.0-34.3.2 due to https://github.com/pypa/setuptools/issues/951 + # Blacklist setuptools 36.2.0 due to https://github.com/pypa/setuptools/issues/1086 + setup_requires="setuptools >= 21.0.0,!=24.0.0," + "!=34.0.0,!=34.0.1,!=34.0.2,!=34.0.3,!=34.1.0,!=34.1.1,!=34.2.0,!=34.3.0,!=34.3.1,!=34.3.2," + "!=36.2.0", extras_require={ ':python_version == "2.7"': [ 'futures>=3.1', From 44968b04c50566598a656f13a11c7339ec487e65 Mon Sep 17 00:00:00 2001 From: Alexey Stepanov Date: Fri, 8 Jun 2018 10:59:43 +0200 Subject: [PATCH 2/2] Move URLs to setup.cfg This attributes are parsed by modern setuptools only, so reduce warnings --- setup.cfg | 3 +++ setup.py | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/setup.cfg b/setup.cfg index efe55ed..fc8c93b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,8 @@ [metadata] name = threaded +project_urls = + Bug Tracker = https://github.com/python-useful-helpers/threaded/issues + Documentation = https://threaded.readthedocs.io/ [options] zip_safe = False diff --git a/setup.py b/setup.py index bdfd0a6..331fbbb 100644 --- a/setup.py +++ b/setup.py @@ -249,10 +249,6 @@ def get_simple_vars_from_src(src): for name, email in variables['__maintainers__'].items() ), url=variables['__url__'], - project_urls={ - "Bug Tracker": "https://github.com/python-useful-helpers/threaded/issues", - "Documentation": "https://threaded.readthedocs.io/", - }, version=variables['__version__'], license=variables['__license__'], description=variables['__description__'],