Skip to content

Commit

Permalink
Use oldest-supported-numpy for build
Browse files Browse the repository at this point in the history
  • Loading branch information
PrimozGodec committed May 4, 2023
1 parent ccffa84 commit 1477d27
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ jobs:
env:
CIBW_ARCHS_LINUX: x86_64 aarch64
CIBW_ARCHS_MACOS: x86_64 arm64
CIBW_ARCHS_WINDOWS: AMD64 x86 ARM64
CIBW_BEFORE_BUILD: pip install numpy scipy
CIBW_ARCHS_WINDOWS: AMD64 x86
CIBW_SKIP: pp* cp36-* cp37-* *-win32 *_i686 *-musllinux_*
CIBW_TEST_COMMAND: pytest -rfxEXs --durations=20 --disable-warnings --showlocals --pyargs gensim
CIBW_TEST_REQUIRES: pytest testfixtures mock
CIBW_TEST_SKIP: cp38* cp39* cp310* *_aarch64 *_arm64 *_universal2
CIBW_BUILD_VERBOSITY: 3

- name: Upload wheels as artifacts
if: always()
Expand Down
10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[build-system]
requires = [
# 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",
]
4 changes: 0 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,11 +346,8 @@ def run(self):
'smart_open >= 1.8.1',
]

setup_requires = [NUMPY_STR]

if need_cython():
install_requires.append(CYTHON_STR)
setup_requires.append(CYTHON_STR)

setup(
name='gensim',
Expand Down Expand Up @@ -399,7 +396,6 @@ def run(self):

test_suite="gensim.test",
python_requires='>=3.8',
setup_requires=setup_requires,
install_requires=install_requires,
tests_require=linux_testenv,
extras_require={
Expand Down

0 comments on commit 1477d27

Please sign in to comment.