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

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: no longer in the source branch.
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 Approve
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.
Revision history for this message
Martin Packman (gz) wrote :

Thanks!

review: Approve
Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :
Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'byov.conf'
--- byov.conf 2018-12-19 01:30:58 +0000
+++ byov.conf 2019-03-04 10:19:29 +0000
@@ -13,6 +13,8 @@
13sphinx_epytext.install3 = (pip3 install sphinx_epytext)13sphinx_epytext.install3 = (pip3 install sphinx_epytext)
14flake8.install = (pip install flake8)14flake8.install = (pip install flake8)
15flake8.install3 = (pip3 install flake8)15flake8.install3 = (pip3 install flake8)
16cython.install = (pip install cython)
17cython.install3 = (pip3 install cython)
1618
17[brz]19[brz]
18# FIXME: we're stuck on xenial20# FIXME: we're stuck on xenial
@@ -25,12 +27,12 @@
2527
26# FIXME: Arguably this should be vm.build_deps=brz but it requires either an28# FIXME: Arguably this should be vm.build_deps=brz but it requires either an
27# available package or at least a debian/ dir ? -- vila 2018-02-2329# available package or at least a debian/ dir ? -- vila 2018-02-23
28brz.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-launchpadlib30brz.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
29subunit.build_deps = python-testscenarios, python3-testscenarios, python-testtools, python3-testtools31subunit.build_deps = python-testscenarios, python3-testscenarios, python-testtools, python3-testtools
30vm.packages = {brz.build_deps}, {subunit.build_deps}, bzr, git, python-junitxml32vm.packages = {brz.build_deps}, {subunit.build_deps}, bzr, git, python-junitxml
31[brz-xenial]33[brz-xenial]
32vm.release = xenial34vm.release = xenial
33byoci.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})35byoci.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})
34# FIXME: bzr log -l2 should be by default -- vila 2018-03-0936# FIXME: bzr log -l2 should be by default -- vila 2018-03-09
35byoci.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"37byoci.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"
36[brz-bionic]38[brz-bionic]
3739
=== modified file 'doc/en/user-guide/installing_breezy.txt'
--- doc/en/user-guide/installing_breezy.txt 2018-11-18 13:43:04 +0000
+++ doc/en/user-guide/installing_breezy.txt 2019-03-04 10:19:29 +0000
@@ -90,7 +90,7 @@
90 3. Put the created directory on your PATH.90 3. Put the created directory on your PATH.
9191
92Advanced users may also wish to build the optional C extensions for greater92Advanced users may also wish to build the optional C extensions for greater
93speed. This can be done using ``make`` and requires ``pyrex`` and a C compiler.93speed. This can be done using ``make`` and requires ``cython`` and a C compiler.
94Please contact us on email or IRC if you need assistance with this.94Please contact us on email or IRC if you need assistance with this.
9595
9696
9797
=== modified file 'setup.py'
--- setup.py 2019-02-19 00:14:52 +0000
+++ setup.py 2019-03-04 10:19:29 +0000
@@ -218,8 +218,17 @@
218 print("")218 print("")
219 from distutils.command.build_ext import build_ext219 from distutils.command.build_ext import build_ext
220else:220else:
221 have_cython = True221 minimum_cython_version = '0.29'
222 cython_version_info = LooseVersion(cython_version)222 cython_version_info = LooseVersion(cython_version)
223 if cython_version_info < LooseVersion(minimum_cython_version):
224 print("Version of Cython is too old. "
225 "Current is %s, need at least %s."
226 % (cython_version, minimum_cython_version))
227 print("If the .c files are available, they will be built,"
228 " but modifying the .pyx files will not rebuild them.")
229 have_cython = False
230 else:
231 have_cython = True
223232
224233
225class build_ext_if_possible(build_ext):234class build_ext_if_possible(build_ext):

Subscribers

People subscribed via source and target branches