mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-19 08:16:19 +00:00
Take a step towards unifying dependency pins used by tox env and Docker image building
This commit is contained in:
parent
4d5b9f2d0c
commit
58ccecff54
@ -3,18 +3,6 @@
|
||||
# https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
|
||||
set -euxo pipefail
|
||||
|
||||
# Basic Python packages that you just need to have around to do anything,
|
||||
# practically speaking.
|
||||
BASIC_DEPS="pip wheel"
|
||||
|
||||
# Python packages we need to support the test infrastructure. *Not* packages
|
||||
# Tahoe-LAFS itself (implementation or test suite) need.
|
||||
TEST_DEPS="tox~=3.0"
|
||||
|
||||
# Python packages we need to generate test reports for CI infrastructure.
|
||||
# *Not* packages Tahoe-LAFS itself (implement or test suite) need.
|
||||
REPORTING_DEPS="python-subunit junitxml subunitreporter"
|
||||
|
||||
# The filesystem location of the wheelhouse which we'll populate with wheels
|
||||
# for all of our dependencies.
|
||||
WHEELHOUSE_PATH="$1"
|
||||
@ -41,15 +29,12 @@ export PIP_FIND_LINKS="file://${WHEELHOUSE_PATH}"
|
||||
LANG="en_US.UTF-8" "${PIP}" \
|
||||
wheel \
|
||||
--wheel-dir "${WHEELHOUSE_PATH}" \
|
||||
"${PROJECT_ROOT}"[test] \
|
||||
${BASIC_DEPS} \
|
||||
${TEST_DEPS} \
|
||||
${REPORTING_DEPS}
|
||||
"${PROJECT_ROOT}"[testenv] \
|
||||
"${PROJECT_ROOT}"[test]
|
||||
|
||||
# Not strictly wheelhouse population but ... Note we omit basic deps here.
|
||||
# They're in the wheelhouse if Tahoe-LAFS wants to drag them in but it will
|
||||
# have to ask.
|
||||
"${PIP}" \
|
||||
install \
|
||||
${TEST_DEPS} \
|
||||
${REPORTING_DEPS}
|
||||
"${PROJECT_ROOT}"[testenv]
|
||||
|
39
setup.py
39
setup.py
@ -398,10 +398,44 @@ setup(name="tahoe-lafs", # also set in __init__.py
|
||||
"dulwich",
|
||||
"gpg",
|
||||
],
|
||||
|
||||
# Here are the dependencies required to set up a reproducible test
|
||||
# environment. This could be for CI or local development. These
|
||||
# are *not* library dependencies of the test suite itself. They are
|
||||
# the tools we use to run the test suite at all.
|
||||
"testenv": [
|
||||
# Pin all of these versions for the same reason you ever want to
|
||||
# pin anything: to prevent new releases with regressions from
|
||||
# introducing spurious failures into CI runs for whatever
|
||||
# development work is happening at the time. The versions
|
||||
# selected here are just the current versions at the time.
|
||||
# Bumping them to keep up with future releases is fine as long
|
||||
# as those releases are known to actually work.
|
||||
|
||||
# XXX For the moment, unpinned so we use whatever is in the
|
||||
# image. The images vary in what versions they have. :/
|
||||
"pip", # ==22.0.3",
|
||||
"wheel", # ==0.37.1"
|
||||
"setuptools", # ==60.9.1",
|
||||
"tox", # ~=3.0",
|
||||
"subunitreporter", # ==22.2.0",
|
||||
"python-subunit", # ==1.4.2",
|
||||
"junitxml", # ==0.7",
|
||||
"coverage", # ~= 5.0",
|
||||
|
||||
# As an exception, we don't pin certifi because it contains CA
|
||||
# certificates which necessarily change over time. Pinning this
|
||||
# is guaranteed to cause things to break eventually as old
|
||||
# certificates expire and as new ones are used in the wild that
|
||||
# aren't present in whatever version we pin. Hopefully there
|
||||
# won't be functionality regressions in new releases of this
|
||||
# package that cause us the kind of suffering we're trying to
|
||||
# avoid with the above pins.
|
||||
"certifi",
|
||||
],
|
||||
|
||||
"test": [
|
||||
"coverage ~= 5.0",
|
||||
"mock",
|
||||
"tox ~= 3.0",
|
||||
"pytest",
|
||||
"pytest-twisted",
|
||||
"hypothesis >= 3.6.1",
|
||||
@ -410,7 +444,6 @@ setup(name="tahoe-lafs", # also set in __init__.py
|
||||
"fixtures",
|
||||
"beautifulsoup4",
|
||||
"html5lib",
|
||||
"junitxml",
|
||||
# Pin old version until
|
||||
# https://github.com/paramiko/paramiko/issues/1961 is fixed.
|
||||
"paramiko < 2.9",
|
||||
|
19
tox.ini
19
tox.ini
@ -30,24 +30,7 @@ passenv = TAHOE_LAFS_* PIP_* SUBUNITREPORTER_* USERPROFILE HOMEDRIVE HOMEPATH
|
||||
# available to those systems. Installing it ahead of time (with pip) avoids
|
||||
# this problem.
|
||||
deps =
|
||||
# Pin all of these versions for the same reason you ever want to pin
|
||||
# anything: to prevent new releases with regressions from introducing
|
||||
# spurious failures into CI runs for whatever development work is
|
||||
# happening at the time. The versions selected here are just the current
|
||||
# versions at the time. Bumping them to keep up with future releases is
|
||||
# fine as long as those releases are known to actually work.
|
||||
pip==22.3.1
|
||||
setuptools==60.9.1
|
||||
wheel==0.37.1
|
||||
subunitreporter==22.2.0
|
||||
# As an exception, we don't pin certifi because it contains CA
|
||||
# certificates which necessarily change over time. Pinning this is
|
||||
# guaranteed to cause things to break eventually as old certificates
|
||||
# expire and as new ones are used in the wild that aren't present in
|
||||
# whatever version we pin. Hopefully there won't be functionality
|
||||
# regressions in new releases of this package that cause us the kind of
|
||||
# suffering we're trying to avoid with the above pins.
|
||||
certifi
|
||||
.[testenv]
|
||||
|
||||
# We add usedevelop=False because testing against a true installation gives
|
||||
# more useful results.
|
||||
|
Loading…
x
Reference in New Issue
Block a user