-
Notifications
You must be signed in to change notification settings - Fork 44
GitHub workflow #140
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
GitHub workflow #140
Conversation
conda-recipe-generic/build.sh
Outdated
@@ -0,0 +1,3 @@ | |||
$PYTHON setup.py build_ext install -- \ | |||
-DNumPy_INCLUDE_DIR=${SP_DIR}/numpy/core/include \ |
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 just filed scikit-build/scikit-build#524 because I think scikit-build should find the venv numpy before system 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.
This recipe is taken from the conda-forge feedstock.
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.
Are we sure the problem is not the fiddling with the python path in
Lines 21 to 32 in 055e9d6
# base site dir, use python installation for location specific includes | |
execute_process( | |
COMMAND "${PYTHON_EXECUTABLE}" -c | |
"import os,numpy; print(os.path.dirname(numpy.__path__[0]))" | |
OUTPUT_VARIABLE PYTHON_SITE | |
OUTPUT_STRIP_TRAILING_WHITESPACE) | |
if(WIN32) | |
string(REPLACE "\\" "/" PYTHON_SITE ${PYTHON_SITE}) | |
endif() | |
find_package(PythonLibs REQUIRED) | |
find_package(NumPy REQUIRED) |
find_package(NumPy )
is not a scikit-build feature but from CMake.
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.
find_package(NumPy ) is not a scikit-build feature but from CMake.
I am wrong here. Scikit-build's FindNumpy is a different thing than FindPython with NumPy component from CMake.
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.
Cool - that find_package
finds the right thing without extra magic. I've noted that on the scikit-build issue.
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.
It might not help us (see my comment linking to the disussion there), because it sets different output variables in cmake. We need to find the correct f2py too. I was experimenting with FindF2PY from scikit-build yesterday. Curious if all the old windows hacks in setup.py and the CMake files are still necessary. They do not seem to work for my setup in the workflow so far.
Thanks for working on this! It looks like this PR will drop Python <= 3.5 (I think Numpy is about to go >= 3.7 anyway); I think that's worth explicitly noting. |
See also python-control/python-control#481 |
@repagh, I remember that prior to the 0.4.0 release you advocated for keeping these different conda recipes. Is this still true? Do we need to test them all? |
12aefb6
to
65ff690
Compare
4d9f1d8
to
44691f0
Compare
3325730
to
8f1c90b
Compare
870ee8c
to
c456fdd
Compare
b7801b6
to
05a0ad9
Compare
56de0c9
to
9abde05
Compare
6c47df1
to
8c216a3
Compare
8c216a3
to
f63397c
Compare
This looks good, but I'm in no position to review the details. One thing I did wonder about: why are the test matrices generated by scripts, and not known upfront? Will we remove Travis CI config after this is merged? For anyone else reviewing, you can see output here: https://github.com/bnavigator/Slycot/actions The warnings there seem to be due to a third-party package; @bnavigator has already queried it conda-incubator/setup-miniconda#132 (comment) Given that free Travis CI is disappearing, I think we should merge this. @murrayrm , @repagh, objections? |
The test matrix generation is based upon which wheel and conda packages are created. With all the exceptions and special cases for combinations of OS and LAPACK implementation, statically defining the matrices would be very complicated. |
898421a
to
c58c564
Compare
No objections to merging on my end. I note that the full CI build seems to take ~30 minutes, but of course it is testing on all sorts of different configurations and OS's. |
Most of the time is wasted by the conda resolver. Especially on Windows. This could be fixed be a frozen environment, which we update manually, but that is maybe something for another PR. |
See https://github.com/bnavigator/Slycot/tree/github-workflow for the GitHub Actions results.
Tasks:
Ubuntu
macOS
Windows
Python Versions: 3.6 to 3.9
Streamline LAPACK linking. The conda-forge packages nowadays always link against the reference implementation but you can use a different one (=the same as numpy) during runtime.
do Add CI test for
import slycot; slycot.test
#137 : Test slycot.test()Builds on #143