diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 8c248a76..72be1f9a 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -21,10 +21,7 @@ jobs: steps: - uses: actions/checkout@v2 - with: - ssh-key: "${{ secrets.NIPREPS_DEPLOY }}" - name: Fetch all tags (for setuptools_scm to work) - if: github.ref == 'refs/heads/master' run: | /usr/bin/git -c protocol.version=2 fetch --tags --prune --unshallow origin - name: Set up Python ${{ matrix.python-version }} diff --git a/pyproject.toml b/pyproject.toml index 531c8d82..9d93f080 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,8 +1,7 @@ [build-system] requires = [ - "setuptools >= 42.0", + "setuptools >= 34.4", "setuptools_scm[toml] >= 3.4", - "setuptools_scm_git_archive", "wheel" ] diff --git a/setup.cfg b/setup.cfg index 2b212e12..17a42969 100644 --- a/setup.cfg +++ b/setup.cfg @@ -14,17 +14,14 @@ long_description_content_type = text/x-rst; charset=UTF-8 maintainer = The NiPreps developers maintainer_email = nipreps@gmail.com project_urls = - Documentation = https://www.templateflow.org/python-client/ - GitHub = https://github.com/templateflow/python-client Archive = https://github.com/templateflow/templateflow -url = https://www.templateflow.org + Bug Tracker = https://github.com/templateflow/python-client/issues + Home = https://www.templateflow.org + Documentation = https://www.templateflow.org/python-client/ + Source Code = https://github.com/templateflow/python-client [options] python_requires = >= 3.6 -setup_requires = - setuptools >= 42.0 - setuptools_scm >= 3.4 - toml install_requires = pybids >= 0.9.2 requests diff --git a/setup.py b/setup.py index 1e5dc5a4..56671f7f 100644 --- a/setup.py +++ b/setup.py @@ -7,12 +7,14 @@ # Give setuptools a hint to complain if it's too old a version # 30.3.0 allows us to put most metadata in setup.cfg # Should match pyproject.toml -SETUP_REQUIRES = [ - "setuptools >= 42.0", - "setuptools_scm >= 3.4", - "setuptools_scm_git_archive", - "toml", -] +# setuptools >= 34.4 required by setuptools_scm +# 40.8.0 includes license_file, reducing MANIFEST.in requirements +# +# To install, 34.4.0 is enough, but if we're building an sdist, require 40.8.0 +# This imposes a stricter rule on the maintainer than the user +# Keep the installation version synchronized with pyproject.toml +SETUP_REQUIRES = ['setuptools >= %s' % ("40.8.0" if "sdist" in sys.argv else "34.4")] +SETUP_REQUIRES += ["setuptools_scm >= 3.4", "toml"] # This enables setuptools to install wheel on-the-fly SETUP_REQUIRES += ["wheel"] if "bdist_wheel" in sys.argv else []