equal
deleted
inserted
replaced
60 import bz2 |
60 import bz2 |
61 bz2.BZ2Compressor # silence unused import warning |
61 bz2.BZ2Compressor # silence unused import warning |
62 except ImportError: |
62 except ImportError: |
63 raise SystemExit( |
63 raise SystemExit( |
64 "Couldn't import standard bz2 (incomplete Python install).") |
64 "Couldn't import standard bz2 (incomplete Python install).") |
|
65 |
|
66 ispypy = "PyPy" in sys.version |
65 |
67 |
66 import os, stat, subprocess, time |
68 import os, stat, subprocess, time |
67 import re |
69 import re |
68 import shutil |
70 import shutil |
69 import tempfile |
71 import tempfile |
274 self.mkpath(join('mercurial', modir)) |
276 self.mkpath(join('mercurial', modir)) |
275 self.make_file([pofile], mobuildfile, spawn, (cmd,)) |
277 self.make_file([pofile], mobuildfile, spawn, (cmd,)) |
276 |
278 |
277 |
279 |
278 class hgdist(Distribution): |
280 class hgdist(Distribution): |
279 pure = 0 |
281 pure = ispypy |
280 |
282 |
281 global_options = Distribution.global_options + \ |
283 global_options = Distribution.global_options + \ |
282 [('pure', None, "use pure (slow) Python " |
284 [('pure', None, "use pure (slow) Python " |
283 "code instead of C extensions"), |
285 "code instead of C extensions"), |
284 ('c2to3', None, "(experimental!) convert " |
286 ('c2to3', None, "(experimental!) convert " |
489 Extension('mercurial.diffhelpers', ['mercurial/diffhelpers.c'], |
491 Extension('mercurial.diffhelpers', ['mercurial/diffhelpers.c'], |
490 depends=common_depends), |
492 depends=common_depends), |
491 Extension('mercurial.mpatch', ['mercurial/mpatch.c'], |
493 Extension('mercurial.mpatch', ['mercurial/mpatch.c'], |
492 depends=common_depends), |
494 depends=common_depends), |
493 Extension('mercurial.parsers', ['mercurial/dirs.c', |
495 Extension('mercurial.parsers', ['mercurial/dirs.c', |
|
496 'mercurial/manifest.c', |
494 'mercurial/parsers.c', |
497 'mercurial/parsers.c', |
495 'mercurial/pathencode.c'], |
498 'mercurial/pathencode.c'], |
496 depends=common_depends), |
499 depends=common_depends), |
497 ] |
500 ] |
498 |
501 |
553 extra = {} |
556 extra = {} |
554 |
557 |
555 if py2exeloaded: |
558 if py2exeloaded: |
556 extra['console'] = [ |
559 extra['console'] = [ |
557 {'script':'hg', |
560 {'script':'hg', |
558 'copyright':'Copyright (C) 2005-2010 Matt Mackall and others', |
561 'copyright':'Copyright (C) 2005-2015 Matt Mackall and others', |
559 'product_version':version}] |
562 'product_version':version}] |
560 # sub command of 'build' because 'py2exe' does not handle sub_commands |
563 # sub command of 'build' because 'py2exe' does not handle sub_commands |
561 build.sub_commands.insert(0, ('build_hgextindex', None)) |
564 build.sub_commands.insert(0, ('build_hgextindex', None)) |
562 |
565 |
563 if os.name == 'nt': |
566 if os.name == 'nt': |