Skip to content

Fix tox CI failure using pip constraints file#372

Merged
barborico merged 1 commit intomainfrom
brynna/fix_deps_build
Feb 13, 2026
Merged

Fix tox CI failure using pip constraints file#372
barborico merged 1 commit intomainfrom
brynna/fix_deps_build

Conversation

@barborico
Copy link
Contributor

Constrain the setuptools version across all pip operations, including isolated build environments. This fixes a breakage whereby setuptools 70+ removed the deprecated pkg_resources module that flatdict 4.0.1's setup.py requires, causing the build to fail:

Collecting flatdict (from okta==2.9.8->-r requirements.txt (line 38))
Downloading flatdict-4.0.1.tar.gz (8.3 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'error'

Setting PIP_CONSTRAINT to a constraints file containing setuptools<70 ensures all pip operations (including isolated builds) use setuptools 69.x, which still includes pkg_resources, allowing flatdict to build successfully.

Ideally, we can remove this with future upgrades to the okta or flatdict packages.

Use a pip constraints file with PIP_CONSTRAINT environment variable to
properly constrain setuptools version across all pip operations, including
isolated build environments.

The previous approach of adding setuptools<70 to tox.ini deps only affected
the main tox environment. When pip creates isolated build environments per
PEP 517 to build packages from source (like flatdict), it installs the
latest setuptools by default. Since setuptools 70+ removed the deprecated
pkg_resources module that flatdict 4.0.1's setup.py requires, the build
fails.

Setting PIP_CONSTRAINT to a constraints file containing setuptools<70
ensures all pip operations (including isolated builds) use setuptools 69.x,
which still includes pkg_resources, allowing flatdict to build successfully.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@barborico barborico merged commit 3a60926 into main Feb 13, 2026
6 checks passed
@barborico barborico deleted the brynna/fix_deps_build branch February 13, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants