-
Notifications
You must be signed in to change notification settings - Fork 30
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
Transition to pyproject.toml; pin numpy > 2 #27
base: master
Are you sure you want to change the base?
Conversation
…mp venv as specced by PEP517
…e imports in setup.py
…n extra file in the repository; remove MANIFEST.in
…d testing, remove uneeded dependencies; pin numpy to >2 everywhere
Thanks @austin2118ace. I figured at one point I should modernize my Since the previous version on conda-forge only supported Python ≤3.10, I finally released v0.2.1 on PyPI and conda-forge a few days ago. For conda-forge, it built successfully on Linux, macOS, and Windows using Python 3.9–3.13. I’m curious if pinning NumPy to >=2 would interfere with this build. What OS and installation process did you use that caused issues? Did you clone the repo and compile from source? With your changes, would the "Compile from source" section in the README now simply look like this?
|
I was building using 3.10 I believe, but using numpy > 2 passed all the Github CI build tests using my files. TBH, it was a while ago and this upgrade was a adhd-fueled on-a-whim project, so I don't remember exactly what our issue was. All I am certain of is that importing oasis when numpy>2 was causing an import error (wasn't just a warning) due to some mismatches in expected variable size I think. I fairly certain we were using the version on conda to avoid the hassle of compiling the extension. Wish I had better info for you unfortunately. However, Yes!
I'm sure there are plenty of other ways, but your recommendation is likely the simplest. |
@j-friedrich Hi! Just checking in to make sure you saw my last comment. Cheers :) |
I ran into an issue integrating oasis into our processing pipeline as we use
numpy > 2
. This caused issues when importing oasis as thePyPa
oasis wheels were built againstnumpy < 2
To approach automatic wheel building for our use case, and to make the package compliant with PEP 518 and PEP 621, I moved most of the information out of
setup.py
intopyproject.yaml
. I also pinnednumpy > 2
so the wheels will be built against the newest headers and make oasis compatible with newer code.setup.py
is still required for building the extension, as thepyproject.toml
spec only has experimental support for building extensions, and I didn't want to stray too far from the known working build environment.An additional note is that
cvxpy==1.6
typically gets pulled during the install. This generates some warning messages about depreciated syntax as of version <1.1, but the code still appears to work as intended.All Github CI builds succeed, and my local runs of the provided test code succeed without issue. I am able to build the package using PyPa
build
and Astral'suv build
both of which invokesetuptools
. The resultant wheel then is installable with no errors and oasis can be imported successfully.Using
pip install -e .
(which automatically builds extensions) succeeds. Further, manually building withpython setup.py build_ext -i
and then runningpip install .
also works.I figured I would share these changes with you in case you were interested in applying them to the main repository.
Cheers!
Austin
Dewan Lab
Florida State University