/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Vincent Ladeuil
  • Date: 2019-03-06 14:03:19 UTC
  • mfrom: (7290.1.15 work)
  • mto: This revision was merged to the branch mainline in revision 7295.
  • Revision ID: v.ladeuil+brz@free.fr-20190306140319-zgjegynpjv3vv0jg
Merge 3.0 into trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
    sys.stderr.write("[ERROR] Not a supported Python version. Need 2.7+\n")
17
17
    sys.exit(1)
18
18
 
 
19
 
 
20
try:
 
21
    import setuptools
 
22
except ImportError:
 
23
    sys.stderr.write("[ERROR] Please install setuptools\n")
 
24
    sys.exit(1)
 
25
 
 
26
 
19
27
# NOTE: The directory containing setup.py, whether run by 'python setup.py' or
20
28
# './setup.py' or the equivalent with another path, should always be at the
21
29
# start of the path, so this should find the right one...
118
126
BREEZY['packages'] = get_breezy_packages()
119
127
 
120
128
 
121
 
from distutils import log
122
 
from distutils.core import setup
 
129
from setuptools import setup
123
130
from distutils.version import LooseVersion
124
131
from distutils.command.install_scripts import install_scripts
125
132
from distutils.command.install_data import install_data
211
218
    print("")
212
219
    from distutils.command.build_ext import build_ext
213
220
else:
214
 
    have_cython = True
 
221
    minimum_cython_version = '0.29'
215
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
216
232
 
217
233
 
218
234
class build_ext_if_possible(build_ext):