diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index c100a179be..8b4b11f174 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -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() diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000000..74783ee72f --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,10 @@ +[build-system] +requires = [ + "Cython==0.29.32", + # this platform use Numpy 1.17 by default but the oldest supported by Gensim is 1.18.5 + "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", +] \ No newline at end of file diff --git a/setup.py b/setup.py index e0dc4e8881..5c131c485d 100644 --- a/setup.py +++ b/setup.py @@ -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', @@ -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={