-
Notifications
You must be signed in to change notification settings - Fork 45
Fix: allow conda builds with Python 3.5 #56
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
Fix: allow conda builds with Python 3.5 #56
Conversation
@@ -33,7 +33,7 @@ requirements: | |||
|
|||
run: | |||
- python {{ PY_VER }} | |||
- numpy >=1.16 | |||
- {{ pin_compatible('numpy') }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking more closely I see these recipes are not for conda-forge builds, so I don't think the pin_compatible will do anything here. I think that is specific to conda-forge. Maybe you just want to pin to numpy 1.11.* in the build section for these custom conda build scripts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is a relevant note in the conda build docs: https://docs.conda.io/projects/conda-build/en/latest/user-guide/tutorials/building-conda-packages.html#edit-the-skeleton-files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks relevant too: https://docs.conda.io/projects/conda-build/en/latest/resources/variants.html?highlight=numpy
I think it should look more like this:
But I'm not quite sure if the shared libs need to be in the run section. |
I'm struggling a bit to get this working. Is it worth fussing over the meta.yaml here? Aren't you going to use an entirely different meta.yaml over at conda-forge anyway? |
It looks like this does not get fixed with meta.yaml. Statespace code uses the numpy.block function, apparently introduced in numpy 1.13, so this fails with numpy 1.11. In control/statesp.py. So if we want numpy 1.11, this should be marked as a bug on python-control. |
Using NumPy 1.11 to compile against provides the larger set of ABI compatibilities. You can then use Slycot compiled with 1.11 with any NumPy 1.11 to present versions. It is the oldest ABI compatible version on linux/osx/windows (as far as I understand, can go back to 1.9 on linux/osx). The nice thing is that you don't have to compile against every version of NumPy. You can bump it up to NumPy 1.13, we should just note in the readme or something about the ABI compatibility range. |
Hm. OK. This conversation on conda-forge suggests using pin_compatible. The latest travis build seems to build with 1.16.2, both python 2.7 and python 3, thanks to not pinning the numpy versions to old ones that give problems on python-control. Strictly speaking, if we want to test with the python-control code, then currently the build requirement should be numpy >= 1.13 Assuming the binary compatibility information is correct, Slycot should be OK with numpy >=1.11 respectively >=1.9. So rather than giving specific numpy ranges, we could use the following for the run requirement:
(The current meta.yaml lists [unix] twice) |
OK, thanks. I'll revert back to the pin_compatible() variant, though as I understand, what I've currently commited (4de751) is essentially the same as pin_compatible('numpy'). I think the I'll change back to pin_compatible, squash the commits, and rerun the builds on Windows. If there are no other objections, I think we can then tag for 0.3.4? |
Use f2py.exe for F2PY if it exists; this is the case for Numpy 1.16, which has been packaged for Python 3.6 and 3.7 in conda or conda-forge. If f2py.exe is not found, use f2py.bat; this is the case for Numpy 1.15, which has been pacakge for Python 3.5. Use pin_compatible for numpy version requirements; at time of this check-in, this builds against Numpy 1.9.3 on Linux, but tests against 1.16.
46de751
to
1419c61
Compare
You are right, that was my mistake. I couldn't find it in the conda docs and the main pages of the conda docs seem to recommend |
Use f2py.exe for F2PY if it exists; this is the case for Numpy 1.16, which has been packaged for Python 3.6 and 3.7 in conda or conda-forge.
If f2py.exe is not found, use f2py.bat; this is the case for Numpy 1.15, which has been pacakge for Python 3.5.