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

Proposed by Jelmer Vernooij on 2019-02-27
Status: Merged
Approved by: Jelmer Vernooij on 2019-03-04
Approved revision: 7292
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/cython-version
Merge into: lp:brz/3.0
Diff against target: 63 lines (+15/-4)
3 files modified
byov.conf (+4/-2)
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
Martin Packman 2019-02-27 Approve on 2019-03-03
Review via email: mp+363703@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.
Martin Packman (gz) wrote :

Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'byov.conf'
2--- byov.conf 2018-12-19 01:30:58 +0000
3+++ byov.conf 2019-03-04 10:19:29 +0000
4@@ -13,6 +13,8 @@
5 sphinx_epytext.install3 = (pip3 install sphinx_epytext)
6 flake8.install = (pip install flake8)
7 flake8.install3 = (pip3 install flake8)
8+cython.install = (pip install cython)
9+cython.install3 = (pip3 install cython)
10
11 [brz]
12 # FIXME: we're stuck on xenial
13@@ -25,12 +27,12 @@
14
15 # FIXME: Arguably this should be vm.build_deps=brz but it requires either an
16 # available package or at least a debian/ dir ? -- vila 2018-02-23
17-brz.build_deps = gcc, debhelper, python, python-all-dev, python3-all-dev, python-configobj, python3-configobj, python-docutils, python3-docutils, python-paramiko, python3-paramiko, python-subunit, python3-subunit, python-testtools, python3-testtools, subunit, cython, cython3, python-pip, python3-pip, python-setuptools, python3-setuptools, python-flake8, python3-flake8, python-sphinx, python3-sphinx, python-launchpadlib, python3-launchpadlib
18+brz.build_deps = gcc, debhelper, python, python-all-dev, python3-all-dev, python-configobj, python3-configobj, python-docutils, python3-docutils, python-paramiko, python3-paramiko, python-subunit, python3-subunit, python-testtools, python3-testtools, subunit, python-pip, python3-pip, python-setuptools, python3-setuptools, python-flake8, python3-flake8, python-sphinx, python3-sphinx, python-launchpadlib, python3-launchpadlib
19 subunit.build_deps = python-testscenarios, python3-testscenarios, python-testtools, python3-testtools
20 vm.packages = {brz.build_deps}, {subunit.build_deps}, bzr, git, python-junitxml
21 [brz-xenial]
22 vm.release = xenial
23-byoci.setup.command = ({dulwich.clone} && {dulwich.install} && {dulwich.install3} && {fastimport.clone} && {fastimport.install} && {fastimport.install3} && {subunit.clone} && {flake8.install} && {flake8.install3} && {sphinx_epytext.install} && {sphinx_epytext.install3})
24+byoci.setup.command = ({dulwich.clone} && {dulwich.install} && {dulwich.install3} && {fastimport.clone} && {fastimport.install} && {fastimport.install3} && {subunit.clone} && {flake8.install} && {flake8.install3} && {sphinx_epytext.install} && {sphinx_epytext.install3} && {cython.install} && {cython.install3})
25 # FIXME: bzr log -l2 should be by default -- vila 2018-03-09
26 byoci.tests.command = bash -o pipefail -c "bzr log -l2 && PYTHONPATH=../subunit/python:$PYTHONPATH PATH=../subunit/filters:$PATH make check-ci | subunit2junitxml -o ../results.xml -f | subunit2pyunit"
27 [brz-bionic]
28
29=== modified file 'doc/en/user-guide/installing_breezy.txt'
30--- doc/en/user-guide/installing_breezy.txt 2018-11-18 13:43:04 +0000
31+++ doc/en/user-guide/installing_breezy.txt 2019-03-04 10:19:29 +0000
32@@ -90,7 +90,7 @@
33 3. Put the created directory on your PATH.
34
35 Advanced users may also wish to build the optional C extensions for greater
36-speed. This can be done using ``make`` and requires ``pyrex`` and a C compiler.
37+speed. This can be done using ``make`` and requires ``cython`` and a C compiler.
38 Please contact us on email or IRC if you need assistance with this.
39
40
41
42=== modified file 'setup.py'
43--- setup.py 2019-02-19 00:14:52 +0000
44+++ setup.py 2019-03-04 10:19:29 +0000
45@@ -218,8 +218,17 @@
46 print("")
47 from distutils.command.build_ext import build_ext
48 else:
49- have_cython = True
50+ minimum_cython_version = '0.29'
51 cython_version_info = LooseVersion(cython_version)
52+ if cython_version_info < LooseVersion(minimum_cython_version):
53+ print("Version of Cython is too old. "
54+ "Current is %s, need at least %s."
55+ % (cython_version, minimum_cython_version))
56+ print("If the .c files are available, they will be built,"
57+ " but modifying the .pyx files will not rebuild them.")
58+ have_cython = False
59+ else:
60+ have_cython = True
61
62
63 class build_ext_if_possible(build_ext):

Subscribers

People subscribed via source and target branches