equal
deleted
inserted
replaced
260 self.mkpath(join('mercurial', modir)) |
260 self.mkpath(join('mercurial', modir)) |
261 self.make_file([pofile], mobuildfile, spawn, (cmd,)) |
261 self.make_file([pofile], mobuildfile, spawn, (cmd,)) |
262 |
262 |
263 |
263 |
264 class hgdist(Distribution): |
264 class hgdist(Distribution): |
265 pure = ispypy |
265 pure = False |
|
266 cffi = ispypy |
266 |
267 |
267 global_options = Distribution.global_options + \ |
268 global_options = Distribution.global_options + \ |
268 [('pure', None, "use pure (slow) Python " |
269 [('pure', None, "use pure (slow) Python " |
269 "code instead of C extensions"), |
270 "code instead of C extensions"), |
270 ] |
271 ] |
314 def finalize_options(self): |
315 def finalize_options(self): |
315 build_py.finalize_options(self) |
316 build_py.finalize_options(self) |
316 |
317 |
317 if self.distribution.pure: |
318 if self.distribution.pure: |
318 self.distribution.ext_modules = [] |
319 self.distribution.ext_modules = [] |
|
320 elif self.distribution.cffi: |
|
321 exts = [] |
|
322 # cffi modules go here |
|
323 self.distribution.ext_modules = exts |
319 else: |
324 else: |
320 h = os.path.join(get_python_inc(), 'Python.h') |
325 h = os.path.join(get_python_inc(), 'Python.h') |
321 if not os.path.exists(h): |
326 if not os.path.exists(h): |
322 raise SystemExit('Python headers are required to build ' |
327 raise SystemExit('Python headers are required to build ' |
323 'Mercurial but weren\'t found in %s' % h) |
328 'Mercurial but weren\'t found in %s' % h) |