#7 Fix Cython installation for fresh CPythons
Merged 5 years ago by churchyard. Opened 5 years ago by churchyard.
tests/ churchyard/python wheel_nocompile  into  master

file modified
+3 -1
@@ -36,7 +36,9 @@ 

  else

      python -m pip install pytest

      if [ "$PYTHON" != "jython" ]; then

-         python -m pip install Cython

+         # 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

  

file modified
+4
@@ -14,6 +14,9 @@ 

      - smoke37:

          dir: smoke

          run: VERSION=3.7 METHOD=venv ./venv.sh

+     - smoke38:

+         dir: smoke

+         run: VERSION=3.8 METHOD=venv ./venv.sh

      - smokepypy:

          dir: smoke

          run: VERSION=2.7 METHOD=virtualenv PYTHON=pypy ./venv.sh
@@ -32,6 +35,7 @@ 

      - python27

      - python36

      - python37

+     - python38

      - pypy

      - pypy3

      - python2-devel

We try to fetch a wheel only and if that fails, we disable compilation.
Useful for fresh CPythons such as 3.8 now, where wheels are not yet ready,
but Cython defaults to compiling (because it detects CPython).

Note that --install-option="--no-cython-compile" makes pip use source package,
hence we don't want to use it right away. We still prefer wheel over
sdist.

Metadata Update from @churchyard:
- Request assigned

5 years ago

This triggers if there's any issue with installing the wheel.
Would it make sense to somehow limit this only to fresh CPythons?

We could possibly if it for 3.8 instead.

After reading more on what this does, it's probably not worth it.
(But it's up to you!)

Otherwise, this looks good. The CI failure looks unrelated.

the CI failure is unrelated.

1 new commit added

  • Smoke test Python 3.8
5 years ago

Added 3.8 smoke test to see if it actually works. Hope it is in the compose already, if not, I'll resubmit the test later.

Pull-Request has been merged by churchyard

5 years ago