Skip to content

Commit

Permalink
setup.cfg: require minimum versions of dependencies
Browse files Browse the repository at this point in the history
This fixes issues where an old version of requirements are cached on a users system, causing build to break on install. Testing by manually loading old versions of packages in tox.
  • Loading branch information
henryiii committed Mar 27, 2021
1 parent 2c1da83 commit fd6ae40
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ jobs:
- name: Run test suite via wheel
run: tox -e ${{env.BASE}}-wheel --skip-pkg-install

- name: Run minimum version test
run: tox -e ${{env.BASE}}-minversion

- name: Rename coverage report file
run: |
import os; os.rename('.tox/coverage.{}.xml'.format(os.environ['BASE']), '.tox/coverage.xml')
Expand Down
17 changes: 12 additions & 5 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ project_urls =
[options]
packages = find:
install_requires =
packaging
pep517>=0.9
toml
importlib-metadata;python_version < "3.8"
typing;python_version<"3"
packaging>=19.0
pep517>=0.9.1
toml>=0.10.0
importlib-metadata>=0.22;python_version < "3.8"
typing>=3.5.2;python_version < "3"
virtualenv>=20.0.35;python_version < "3"
python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
package_dir =
Expand All @@ -49,6 +49,13 @@ docs =
sphinx~=3.0
sphinx-argparse-cli>=1.5
sphinx-autodoc-typehints>=1.10
lockminversions =
packaging==19.0
pep517==0.9.1
toml==0.10.0
importlib-metadata==0.22;python_version < "3.8"
typing==3.5.2.2;python_version < "3"
virtualenv==20.0.35;python_version < "3"
test =
filelock>=3
pytest>=4
Expand Down
9 changes: 9 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ envlist =
type
docs
{py39, py38, py37, py36, py35, py27, pypy3, pypy2}{, -path, -sdist, -wheel}
{py27, py35, py39}-minversion
isolated_build = true
skip_missing_interpreters = true
minversion = 3.14
Expand Down Expand Up @@ -55,6 +56,14 @@ commands =
mypy --python-version 3.5 src/build
mypy --python-version 2.7 src/build

[testenv:minversion]
description = check minimum versions required of all dependencies
extras =
test
lockminversions
commands =
pytest -rsx tests {posargs:-n auto}

[testenv:docs]
description = build documentations
basepython = python3.8
Expand Down

0 comments on commit fd6ae40

Please sign in to comment.