I'm starting to use pipenv in order to replace the pip freeze > requirements.txt
and get some more advanced control of our third party dependencies. All my new code is done in Python 3.8
The problem is that when I use tox
to validate my code against Python 2.7, pipenv
checks the pipfile.lock
which contains the hashes used by Python 3.8, causing the installation to fail. How do I configure tox
to create a new environment from scratch without using the hashes in the pipfile lock?
My pipfile:
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
jinja2 = "*"
pandas = "*"
python-docx = "*"
docxtpl = "*"
numpy = "*"
af-design-report = {path = ".", editable = true}
[dev-packages]
flake8 = "*"
coverage = "*"
tox = "*"
pytest = "*"
pytest-coverage = "*"
pytest-flake8 = "*"
Sphinx = "*"
tox-pipenv = "*"
My tox.ini:
[tox]
envlist = py27,py38
[testenv:py27]
allowlist_externals=pipenv
commands =
pipenv install --dev
pytest --cov-report html:cov_html --cov=af_design_report tests
[testenv:py38]
allowlist_externals=pipenv
commands =
pipenv install --dev
pytest --cov-report html:cov_html --cov=af_design_report tests
[testenv:docs]
description = invoke sphinx-build to build the HTML docs
deps = sphinx >= 1.7.5, < 2
commands = build