-
Notifications
You must be signed in to change notification settings - Fork 42
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
Scikit buildsystem #38
Conversation
FYI, this will hopefully be merged today: conda-forge/scikit-build-feedstock#11 |
FYI, conda forge now has scikit-build 0.8.0.: conda-forge/scikit-build-feedstock#14 |
Yes, works. Am using the conda-forge scikit-build now, with a conda install for CONDA=0, and through the meta.yaml for CONDA=1 |
@murrayrm , @moorepants, can this be merged? It uses the scikit-build currently in conda-forge (no longer needs the hack), builds and runs successfully on Linux, OSX, and Windows. |
I can't get this to build on Ubuntu 18.04 64-bit. Conda version 4.5.11, conda build 3.16.0. Build command
I've attached a complete build log. Any ideas what I'm doing wrong? |
LGTM |
Actually I have one question. Since setup.py has changed and now requires scikit build, this needs to be made an explicit build dependency of the package. And will it work without using conda and conda-forge? |
I'd also like to test this on MacOS and make sure that it still works. Has anyone tried it? |
And today it builds. conda-build 3.16.1, and scikit-build 0.8.1 (previously 0.8.0). I've got the build log if anyone's interested. |
@@ -5,7 +5,7 @@ | |||
Slycot wraps the SLICOT library which is used for control and systems analysis. | |||
|
|||
""" | |||
from __future__ import division, print_function | |||
from skbuild import setup |
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.
The installation documentation will need to let users know of this new requirement, as well as cmake (and any other build tools that now need to be installed). I personally think that skbuild should be an optional requirement because a user can build it without this if they so desire.
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.
I added information on scikit-build and cmake requirements to the readme file.
I don't think it is feasible to maintain two buildsystems. I got to use cmake/skbuild after repeatedly trying to use and tweak the numpy distutils, however I found no way to specify flang to the distutils buildsystem, while flang works wonderfully for Windows builds.
The buildsystem does not rely on conda; if skbuild and cmake are available, local builds work fine.
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.
Ok, seems reasonable.
this had a failure on Dec. 8 https://travis-ci.org/python-control/Slycot/jobs/465308309 ; I reran one case (Python 3.6, TEST_CONDA=1) today without changing anything, and it passed https://travis-ci.org/roryyorke/Slycot/builds/473027170. Will try a rebuild (feels a bit pointless, but what the heck...). |
According to [1], use Miniconda2-latest-Linux-x86_64.sh. This fixes a build bug on Travis. [1] https://conda.io/docs/user-guide/tasks/use-conda-with-travis-ci.html, retrieved 2018-12-28.
Co-Authored-By: repagh <[email protected]>
…into scikit-buildsystem
There seems to be something wrong with the conda-build for python 2.7. Have not found a fix for that yet. |
Doesn't repagh/Slycot#2 fix the Python 2 build? See https://travis-ci.org/roryyorke/Slycot/builds/473091198 |
Update Miniconda URL from Conda docs.
Good catch. It now works! |
If there are no objections to this in the next week, I propose merging to master. In favour:
Two downsides:
|
I am not quite sure. As far as I know things that rely on Fortran are not possible to compile on Windows with the conda forge system. But maybe things have changed in the last months. The last I could understand was that flang might be the only way forward there. |
Looks like numpy is built for all OSs on conda forge, but scipy isn't build on windows for some reason. It maybe be that there is still some hurdle. |
It looks like the numpy feedstock installs from the numpy wheel on pypi (which is build with ATLAS on windows) and doesn't actually build on appveyor. The best bet would be to build slycot wheels for windows manually and then have the conda forge recipe install them. |
Since v.1.0 we are able to build SciPy on Windows via OpenBLAS. It is still definitely not a walk in the park to build the BLAS of choice but if you just use a prebuilt BLAS flavor it is quite possible (I will modify the notes with a correction soon scipy/scipy#9669). |
It'd be great to get that working on conda forge so that other packages that need to build on windows would have a working example. |
I use a pretty bare Windows (in a virtualbox) to build the conda packages with scikit, with the following manually installed:
For the build this uses the conda-forge flang (available win64 only), cmake, scikit-build, etc. I don't know what the conda-forge windows buildsystem looks like, but I would guess this would be compatible. p.s. python setup.py bdist_wheel simply works. I tried that against the openblas from conda-forge, you would need to have a wheel-based openblas to use it outside the conda ecosystem. |
As soon as this is merged we can give it a shot on conda-forge and see what happens. |
Sorry, I thought I saw an issue about scikit-build and wheels, but the only one I can find now is closed. I may be wrong about "setup.py develop" too; see, e.g., scikit-build/scikit-build#371 |
After many iterations, a better set of changes for using scikit-build.
Works with conda build and with direct python/pip builds
This still contains a workaround for the lack of recent (>= 0.6.1) scikit-build on conda-forge. Directly installs & uninstall scikit-build using pip as part of a conda build. Can be simplified later.
Recent scikit build (0.8.1) available both on conda-forge and pip correctly build this.