setup.py
changeset 15458 c3a6ec304055
parent 15388 eb6c0d47c3d5
child 15459 434c48e981b8
equal deleted inserted replaced
15457:1470f8b00694 15458:c3a6ec304055
   219 
   219 
   220 # Insert hgbuildmo first so that files in mercurial/locale/ are found
   220 # Insert hgbuildmo first so that files in mercurial/locale/ are found
   221 # when build_py is run next.
   221 # when build_py is run next.
   222 build.sub_commands.insert(0, ('build_mo', None))
   222 build.sub_commands.insert(0, ('build_mo', None))
   223 
   223 
   224 Distribution.pure = 0
   224 class hgdist(Distribution):
   225 Distribution.global_options.append(('pure', None, "use pure (slow) Python "
   225     pure = 0
   226                                     "code instead of C extensions"))
   226 
       
   227     global_options = Distribution.global_options + \
       
   228                      [('pure', None, "use pure (slow) Python "
       
   229                         "code instead of C extensions"),
       
   230                      ]
   227 
   231 
   228 class hgbuildext(build_ext):
   232 class hgbuildext(build_ext):
   229 
   233 
   230     def build_extension(self, ext):
   234     def build_extension(self, ext):
   231         try:
   235         try:
   433       py_modules=pymodules,
   437       py_modules=pymodules,
   434       ext_modules=extmodules,
   438       ext_modules=extmodules,
   435       data_files=datafiles,
   439       data_files=datafiles,
   436       package_data=packagedata,
   440       package_data=packagedata,
   437       cmdclass=cmdclass,
   441       cmdclass=cmdclass,
       
   442       distclass=hgdist,
   438       options=dict(py2exe=dict(packages=['hgext', 'email']),
   443       options=dict(py2exe=dict(packages=['hgext', 'email']),
   439                    bdist_mpkg=dict(zipdist=True,
   444                    bdist_mpkg=dict(zipdist=True,
   440                                    license='COPYING',
   445                                    license='COPYING',
   441                                    readme='contrib/macosx/Readme.html',
   446                                    readme='contrib/macosx/Readme.html',
   442                                    welcome='contrib/macosx/Welcome.html')),
   447                                    welcome='contrib/macosx/Welcome.html')),