Merge lp:~jelmer/brz/cython-version into lp:brz

Proposed by Jelmer Vernooij
Status: Superseded
Proposed branch: lp:~jelmer/brz/cython-version
Merge into: lp:brz
Diff against target: 35 lines (+11/-2)
2 files modified
doc/en/user-guide/installing_breezy.txt (+1/-1)
setup.py (+10/-1)
To merge this branch: bzr merge lp:~jelmer/brz/cython-version
Reviewer Review Type Date Requested Status
Breezy developers Pending
Review via email: mp+363261@code.launchpad.net

Commit message

Don't use cython if it's too old.

Description of the change

Don't use cython if it's too old.

We currently require at least version 0.29, since older versions generate C code that doesn't build against Python 3.7.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'doc/en/user-guide/installing_breezy.txt'
2--- doc/en/user-guide/installing_breezy.txt 2018-11-18 13:43:04 +0000
3+++ doc/en/user-guide/installing_breezy.txt 2019-02-17 17:48:19 +0000
4@@ -90,7 +90,7 @@
5 3. Put the created directory on your PATH.
6
7 Advanced users may also wish to build the optional C extensions for greater
8-speed. This can be done using ``make`` and requires ``pyrex`` and a C compiler.
9+speed. This can be done using ``make`` and requires ``cython`` and a C compiler.
10 Please contact us on email or IRC if you need assistance with this.
11
12
13
14=== modified file 'setup.py'
15--- setup.py 2019-02-06 05:44:37 +0000
16+++ setup.py 2019-02-17 17:48:19 +0000
17@@ -211,8 +211,17 @@
18 print("")
19 from distutils.command.build_ext import build_ext
20 else:
21- have_cython = True
22+ minimum_cython_version = '0.29'
23 cython_version_info = LooseVersion(cython_version)
24+ if cython_version_info < LooseVersion(minimum_cython_version):
25+ print("Version of Cython is too old. "
26+ "Current is %s, need at least %s."
27+ % (cython_version, minimum_cython_version))
28+ print("If the .c files are available, they will be built,"
29+ " but modifying the .pyx files will not rebuild them.")
30+ have_cython = False
31+ else:
32+ have_cython = True
33
34
35 class build_ext_if_possible(build_ext):

Subscribers

People subscribed via source and target branches