equal
deleted
inserted
replaced
370 'Mercurial but weren\'t found in %s' % h) |
370 'Mercurial but weren\'t found in %s' % h) |
371 |
371 |
372 def run(self): |
372 def run(self): |
373 if self.distribution.pure: |
373 if self.distribution.pure: |
374 modulepolicy = 'py' |
374 modulepolicy = 'py' |
|
375 elif self.build_lib == '.': |
|
376 # in-place build should run without rebuilding C extensions |
|
377 modulepolicy = 'allow' |
375 else: |
378 else: |
376 modulepolicy = 'c' |
379 modulepolicy = 'c' |
377 with open("mercurial/__modulepolicy__.py", "w") as f: |
380 with open("mercurial/__modulepolicy__.py", "w") as f: |
378 f.write('# this file is autogenerated by setup.py\n') |
381 f.write('# this file is autogenerated by setup.py\n') |
379 f.write('modulepolicy = b"%s"\n' % modulepolicy) |
382 f.write('modulepolicy = b"%s"\n' % modulepolicy) |