diff --git a/smoke/venv.sh b/smoke/venv.sh index d52ce65..8c0d4c9 100755 --- a/smoke/venv.sh +++ b/smoke/venv.sh @@ -50,16 +50,6 @@ python -c 'import sys; print(sys.version)' | head -n1 | grep $VERSION # install packages with pip python -m pip install pytest -if [ "$CYTHON" == "true" ]; then - if [ "$VERSION" == "3.12" ]; then - # Cython support for 3.12.0a1+ is not yet released - python -m pip install https://github.com/cython/cython/archive/master.tar.gz --install-option="--no-cython-compile" - else - # We try to fetch a wheel only and if that fails, we disable compilation - # Useful for fresh CPythons, where wheels are not yet ready, but Cython defaults to compiling - python -m pip install Cython --only-binary :all: || python -m pip install Cython --install-option="--no-cython-compile" - fi -fi # run tests cat > test_foo.py << EOF @@ -80,6 +70,12 @@ def two(): return add(a, b) EOF +cat > pyproject.toml << EOF +[build-system] +requires = ["setuptools", "cython"] +build-backend = "setuptools.build_meta" +EOF + cat > setup.py << EOF from setuptools import setup from Cython.Build import cythonize @@ -87,7 +83,7 @@ from Cython.Build import cythonize setup(ext_modules = cythonize('module.pyx')) EOF -python setup.py build_ext --inplace +python -m pip install . python -c 'import module; print(module.two())' | grep '^2$' fi