-
-
Notifications
You must be signed in to change notification settings - Fork 11k
BLD: put openblas library in local directory on windows #16101
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
Conversation
Hmm, that didn't work: |
It looks like you still need to install |
8f4669f
to
c692cf3
Compare
I needed to change to powershell to add the windows-formatted name of the directory as an environmental variable. The windows build uses I also noticed one of the build steps had a small problem so I tweaked it to succeed. |
6b6b35c
to
a5ebb57
Compare
@@ -32,15 +40,15 @@ steps: | |||
refreshenv | |||
} | |||
python -c "from tools import openblas_support; openblas_support.make_init('numpy')" | |||
pip wheel -v -v -v --wheel-dir=dist . | |||
pip wheel -v -v -v --no-build-isolation --no-use-pep517 --wheel-dir=dist . |
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.
While not really part of the openblas handling, this will disable all the fancy "copy to tmp directory, exec(setup.py)" things that pip now does when calling pip wheel
. The former slows things down, the latter breaks our setup.py (it cannot find parse_setuppy_commands
)
|
||
ls dist -r | Foreach-Object { | ||
pip install $_.FullName | ||
} | ||
displayName: 'Build NumPy' | ||
- bash: | | ||
pushd . && cd .. && target=$(python -c "import numpy, os; print(os.path.abspath(os.path.join(os.path.dirname(numpy.__file__), '.libs')))") && popd | ||
pip download -d destination --only-binary --no-deps numpy==1.14 | ||
pip download -d destination --only-binary :all: --no-deps numpy==1.14 |
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 was broken
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.
Out of curiosity, why download numpy==1.14
?
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.
If I recall correctly, this was added to test that numpy will still load properly even if there are two fortran dlls in the .lib directory on windows. The real test is in the next step
echo "##vso[task.setvariable variable=OPENBLAS64_]$pwd\openblas" | ||
} else { | ||
echo "##vso[task.setvariable variable=OPENBLAS]$pwd\openblas" | ||
} |
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 need to add OPENBLAS_SUFFIX (line 20, 21) seems to me to be a bug in the packaging of the openblas-lib. It knows about 64bit builds, and should package the library appropriately.
FYI: I tried making some changes similar to these for the SciPy tests: scipy/scipy#11965 |
Azure tests now passing, I think this is ready for review |
Fixes #16107 |
This may not be the end of the story, but we need to get CI working again so in it goes. I've also marked it for possible backport for the 1.18.4 release if needed. Thanks Matti. |
These changes on the windows end are annoying, it would be nice if we got some prior warning. |
Perhaps partly my fault--I think there was a warning in the Azure docs somewhere about depending on absolute paths with drive letters, but it was easier to do at the time. |
* BLD: put openblas library in local directory on windows * TST: fix broken pip install on windows * BLD: handle 64-bit windows BLAS
Something changed in the image used for windows on azure: python is on C: and the checkout is done in D:. This causes mingw to fail to link with the openblas library if it is put in the "known path"
<python-dir>/libs
that the openblas discovery mechanism searches. Instead, use an environment variable$OPENBLAS
to point to a local directory and copy the library there.This code is
copiedbased on code from numpy-wheels.