-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build wheels with oldest supported numpy (#3467)
* Use oldest-supported-numpy for build * add workflow step to test wheels against older numpy * download installwheel.py * fix installwheel command * patch installwheel.py to take processor into account * patch installwheel.py * patch installwheel.py * add step to debug test environment * work around numpy bug numpy/numpy#23104 * add pip freeze prior to wheel build * git add .github/workflows/pipfreezedammit.py * work around cibuildwheel not outputting pip-freeze * update build-wheels.yml * Revert previous commits This reverts commit 69c33bf. This reverts commit a6cdaa0. This reverts commit eef4177. This reverts commit 8f63e7b. --------- Co-authored-by: Michael Penkov <m@penkov.dev>
- Loading branch information
1 parent
7dadd70
commit eb98bf3
Showing
4 changed files
with
97 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
"""Install a wheel for the current platform.""" | ||
import os | ||
import platform | ||
import subprocess | ||
import sys | ||
|
||
|
||
def main(): | ||
subdir = sys.argv[1] | ||
vi = sys.version_info | ||
|
||
if platform.system() in ('Linux', 'Darwin'): | ||
arch = 'x86_64' | ||
else: | ||
arch = 'amd64' | ||
|
||
want = f'-cp{vi.major}{vi.minor}-' | ||
suffix = f'_{arch}.whl' | ||
|
||
files = sorted(os.listdir(subdir)) | ||
for f in files: | ||
if want in f and f.endswith(suffix): | ||
command = [sys.executable, '-m', 'pip', 'install', os.path.join(subdir, f)] | ||
subprocess.check_call(command) | ||
return 0 | ||
|
||
print(f'no matches for {want} / {suffix} in {subdir}:') | ||
print('\n'.join(files)) | ||
|
||
return 1 | ||
|
||
|
||
|
||
if __name__ == '__main__': | ||
sys.exit(main()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[build-system] | ||
requires = [ | ||
"Cython>=0.29.32", | ||
# oldest supported Numpy for this platform is 1.17 but the oldest supported by Gensim | ||
# is 1.18.5, remove the line when they increase oldest supported Numpy for this platform | ||
"numpy==1.18.5; python_version=='3.8' and platform_machine not in 'arm64|aarch64'", | ||
"oldest-supported-numpy; python_version>'3.8' or platform_machine in 'arm64|aarch64'", | ||
"scipy", | ||
"setuptools", | ||
"wheel", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters