##// END OF EJS Templates
setup: prevent setuptools from laying an egg...
Matt Harbison -
r32647:331dcf19 default
parent child Browse files
Show More
@@ -77,6 +77,7 from distutils.command.build import buil
77 from distutils.command.build_ext import build_ext
77 from distutils.command.build_ext import build_ext
78 from distutils.command.build_py import build_py
78 from distutils.command.build_py import build_py
79 from distutils.command.build_scripts import build_scripts
79 from distutils.command.build_scripts import build_scripts
80 from distutils.command.install import install
80 from distutils.command.install_lib import install_lib
81 from distutils.command.install_lib import install_lib
81 from distutils.command.install_scripts import install_scripts
82 from distutils.command.install_scripts import install_scripts
82 from distutils.spawn import spawn, find_executable
83 from distutils.spawn import spawn, find_executable
@@ -464,6 +465,14 class buildhgexe(build_ext):
464 dir = os.path.dirname(self.get_ext_fullpath('dummy'))
465 dir = os.path.dirname(self.get_ext_fullpath('dummy'))
465 return os.path.join(self.build_temp, dir, 'hg.exe')
466 return os.path.join(self.build_temp, dir, 'hg.exe')
466
467
468 class hginstall(install):
469 def get_sub_commands(self):
470 # Screen out egg related commands to prevent egg generation. But allow
471 # mercurial.egg-info generation, since that is part of modern
472 # packaging.
473 excl = {'bdist_egg'}
474 return filter(lambda x: x not in excl, install.get_sub_commands(self))
475
467 class hginstalllib(install_lib):
476 class hginstalllib(install_lib):
468 '''
477 '''
469 This is a specialization of install_lib that replaces the copy_file used
478 This is a specialization of install_lib that replaces the copy_file used
@@ -575,6 +584,7 cmdclass = {'build': hgbuild,
575 'build_py': hgbuildpy,
584 'build_py': hgbuildpy,
576 'build_scripts': hgbuildscripts,
585 'build_scripts': hgbuildscripts,
577 'build_hgextindex': buildhgextindex,
586 'build_hgextindex': buildhgextindex,
587 'install': hginstall,
578 'install_lib': hginstalllib,
588 'install_lib': hginstalllib,
579 'install_scripts': hginstallscripts,
589 'install_scripts': hginstallscripts,
580 'build_hgexe': buildhgexe,
590 'build_hgexe': buildhgexe,
General Comments 0
You need to be logged in to leave comments. Login now