Skip to content

Commit

Permalink
fix: 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 26, 2021
1 parent 2c1da83 commit f9f2e46
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ jobs:
- name: Run test suite via wheel
run: tox -e ${{env.BASE}}-wheel --skip-pkg-install

- name: Run minimum version test
if: env.BASE == 'py27' || env.BASE == 'py35' || env.BASE == 'py36'
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
10 changes: 5 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 Down
28 changes: 28 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, py36}-minversion
isolated_build = true
skip_missing_interpreters = true
minversion = 3.14
Expand Down Expand Up @@ -55,6 +56,33 @@ commands =
mypy --python-version 3.5 src/build
mypy --python-version 2.7 src/build

[testenv:py27-minversion]
description = check minimum versions required of all dependencies
deps =
importlib-metadata==0.22
virtualenv==20.0.35
typing==3.5.2.2
pep517==0.9.1
packaging==19.0
toml==0.10.0
extras =
test
commands =
pytest -rsx tests {posargs:-n auto}

[testenv:{py35,py36}-minversion]
description = check minimum versions required of all dependencies
deps =
importlib-metadata==0.22
pep517==0.9.1
packaging==19.0
toml==0.10.0
extras =
test
commands =
pytest -rsx tests {posargs:-n auto}


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

0 comments on commit f9f2e46

Please sign in to comment.