Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add build constraint file #25

Merged
merged 1 commit into from
Jun 17, 2024
Merged

Add build constraint file #25

merged 1 commit into from
Jun 17, 2024

Conversation

BryceStevenWilley
Copy link
Contributor

@BryceStevenWilley BryceStevenWilley commented Jun 17, 2024

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 SuffolkLITLab/FormFyxer#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.

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`.
@BryceStevenWilley BryceStevenWilley self-assigned this Jun 17, 2024
@BryceStevenWilley BryceStevenWilley merged commit 0aa9cb4 into main Jun 17, 2024
1 check passed
@BryceStevenWilley BryceStevenWilley deleted the fix_numpy_pt1 branch June 17, 2024 01:41
BryceStevenWilley added a commit that referenced this pull request Jun 17, 2024
Use the build-constraints.txt file when building all repos, to avoid
using numpy 2 which can break spacy.

Continues on the work done in #25. 

---

Tested on SuffolkLITLab/FormFyxer#136.
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.

1 participant