From facabc4531a4964fd124f1412967773e8c5f54c8 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Tue, 20 Aug 2019 21:23:56 -0400 Subject: [PATCH 1/3] MAINT: Add python_requires to package metadata --- nipype/info.py | 1 + setup.py | 1 + 2 files changed, 2 insertions(+) diff --git a/nipype/info.py b/nipype/info.py index f03e625dda..827bc93a12 100644 --- a/nipype/info.py +++ b/nipype/info.py @@ -61,6 +61,7 @@ def get_nipype_gitversion(): 'Programming Language :: Python :: 3.7', 'Topic :: Scientific/Engineering' ] +PYTHON_REQUIRES = ">= 2.7, != 3.0.*, != 3.1.*, != 3.2.*, != 3.3.*" description = 'Neuroimaging in Python: Pipelines and Interfaces' diff --git a/setup.py b/setup.py index 37677afd35..72ba59d904 100755 --- a/setup.py +++ b/setup.py @@ -139,6 +139,7 @@ def main(): author_email=ldict['AUTHOR_EMAIL'], platforms=ldict['PLATFORMS'], version=ldict['VERSION'], + python_requires=ldict['PYTHON_REQUIRES'], install_requires=ldict['REQUIRES'], setup_requires=SETUP_REQUIRES, provides=ldict['PROVIDES'], From 3261b8dba0037a898b0325a910be309d13f9e6d1 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Tue, 20 Aug 2019 21:27:55 -0400 Subject: [PATCH 2/3] CI: Check python_requires blocks installation --- .circleci/config.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 828fcf44f6..6f612dae6a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -368,6 +368,14 @@ jobs: pip install dist/nipype-*-py2.py3-none-any.whl # Numpy should be upgraded to >= 1.15.3 test "$(pip show numpy | grep Version)" \> "Version: 1.15.2" + - run: + name: Check python_requires prevents installation on Python 3.3 + command: | + pyenv install 3.3.7 + pyenv local 3.3.7 + FAIL=false + pip install dist/nipype-*-py2.py3-none-any.whl || FAIL=true + $FAIL - store_artifacts: path: /home/circleci/nipype/dist From 70d6cbd6a1b4c2b91693844a299edc77d15092a4 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Tue, 20 Aug 2019 21:36:30 -0400 Subject: [PATCH 3/3] CI: Switch from setup.py check to twine check --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6f612dae6a..a5d59eb75b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -340,8 +340,8 @@ jobs: name: Check pypi preconditions command: | pip install --upgrade pip twine future wheel readme_renderer setuptools - python setup.py check -r -s python setup.py sdist bdist_wheel + twine check dist/* - run: name: Validate Python 2 installation command: |