SuffolkLITLab / ALActions

A github repo with all of the shared actions used in Assembly Line Projects
1 stars 0 forks source link

Add build constraint file #25

Closed BryceStevenWilley closed 4 months ago

BryceStevenWilley commented 4 months ago

Numpy 2.0 doesn't play well with some requirements of our python packages, i.e. spacy and thinc, used in FormFyxer.

This change adds a build-contraint file, as inspired by https://thinc.ai/docs/install#extended, which will prevent python from trying to use numpy 2 when doing isolated builds.

Since this file is best referenced from https://raw.githubusercontent.com, this commit will be merged into main first, and then a commit that references this file will be used in publish/action.yml.

See https://github.com/SuffolkLITLab/FormFyxer/issues/135


Have tested locally that this works, but running:

PIP_CONSTRAINT=../ALActions/publish/build-constraints.txt python -m build --sdist --wheel --outdir dist

both on a project that is broken by the numpy 2 stuff (FormFyxer) and one that isn't (docassemble-EFSPIntegration), and both still run correctly with this file.