##// END OF EJS Templates
test-regression: backing out D9640 (63c923fd7fa8)...
marmoute -
r47033:2ef575c6 default
parent child Browse files
Show More
@@ -196,7 +196,6 b' from distutils.command.build_ext import '
196 from distutils.command.build_py import build_py
196 from distutils.command.build_py import build_py
197 from distutils.command.build_scripts import build_scripts
197 from distutils.command.build_scripts import build_scripts
198 from distutils.command.install import install
198 from distutils.command.install import install
199 from distutils.command.install_data import install_data
200 from distutils.command.install_lib import install_lib
199 from distutils.command.install_lib import install_lib
201 from distutils.command.install_scripts import install_scripts
200 from distutils.command.install_scripts import install_scripts
202 from distutils import log
201 from distutils import log
@@ -213,12 +212,6 b' from distutils.version import StrictVers'
213 # Explain to distutils.StrictVersion how our release candidates are versionned
212 # Explain to distutils.StrictVersion how our release candidates are versionned
214 StrictVersion.version_re = re.compile(r'^(\d+)\.(\d+)(\.(\d+))?-?(rc(\d+))?$')
213 StrictVersion.version_re = re.compile(r'^(\d+)\.(\d+)(\.(\d+))?-?(rc(\d+))?$')
215
214
216 # Can we build the documentation?
217 try:
218 import docutils
219 except ImportError:
220 docutils = None
221
222
215
223 def write_if_changed(path, content):
216 def write_if_changed(path, content):
224 """Write content to a file iff the content hasn't changed."""
217 """Write content to a file iff the content hasn't changed."""
@@ -478,14 +471,6 b' class hgbuild(build):'
478 # when build_py is run next.
471 # when build_py is run next.
479 sub_commands = [('build_mo', None)] + build.sub_commands
472 sub_commands = [('build_mo', None)] + build.sub_commands
480
473
481 def run(self):
482 if os.name == 'nt':
483 pass
484 elif docutils is None:
485 log.warn('not building optional documentation')
486 else:
487 self.run_command('build_doc')
488
489
474
490 class hgbuildmo(build):
475 class hgbuildmo(build):
491
476
@@ -1055,43 +1040,6 b' class hgbuilddoc(Command):'
1055 genhtml(root)
1040 genhtml(root)
1056
1041
1057
1042
1058 class hginstalldata(install_data):
1059 user_options = install_data.user_options + [
1060 (
1061 'install-man=',
1062 None,
1063 'installation directory for manual pages [share/man]',
1064 ),
1065 ]
1066
1067 install_man = None
1068
1069 def finalize_options(self):
1070 install_data.finalize_options(self)
1071
1072 self.set_undefined_options('install', ('install_man', 'install_man'))
1073
1074 if self.install_man is None:
1075 self.install_man = os.path.join('share', 'man')
1076
1077 if os.name == 'nt':
1078 pass
1079 elif docutils is None:
1080 log.warn('not installing manual pages')
1081 else:
1082 manpages = [
1083 f for f in os.listdir('doc') if re.search(r'\.[0-9]$', f)
1084 ]
1085
1086 self.data_files += [
1087 (
1088 os.path.join(self.install_man, 'man' + ext[1:]),
1089 ['doc/' + f for f in manpages if f.endswith(ext)],
1090 )
1091 for ext in set(os.path.splitext(f)[1] for f in manpages)
1092 ]
1093
1094
1095 class hginstall(install):
1043 class hginstall(install):
1096
1044
1097 user_options = install.user_options + [
1045 user_options = install.user_options + [
@@ -1105,26 +1053,17 b' class hginstall(install):'
1105 None,
1053 None,
1106 'noop, present for eggless setuptools compat',
1054 'noop, present for eggless setuptools compat',
1107 ),
1055 ),
1108 (
1109 'install-man=',
1110 None,
1111 'installation directory for manual pages [share/man]',
1112 ),
1113 ]
1056 ]
1114
1057
1115 # Also helps setuptools not be sad while we refuse to create eggs.
1058 # Also helps setuptools not be sad while we refuse to create eggs.
1116 single_version_externally_managed = True
1059 single_version_externally_managed = True
1117
1060
1118 install_man = None
1119
1120 def get_sub_commands(self):
1061 def get_sub_commands(self):
1121 subcommands = install.get_sub_commands(self)
1122 subcommands.append('install_data')
1123 # Screen out egg related commands to prevent egg generation. But allow
1062 # Screen out egg related commands to prevent egg generation. But allow
1124 # mercurial.egg-info generation, since that is part of modern
1063 # mercurial.egg-info generation, since that is part of modern
1125 # packaging.
1064 # packaging.
1126 excl = {'bdist_egg'}
1065 excl = {'bdist_egg'}
1127 return filter(lambda x: x not in excl, subcommands)
1066 return filter(lambda x: x not in excl, install.get_sub_commands(self))
1128
1067
1129
1068
1130 class hginstalllib(install_lib):
1069 class hginstalllib(install_lib):
@@ -1326,7 +1265,6 b' cmdclass = {'
1326 'build_hgextindex': buildhgextindex,
1265 'build_hgextindex': buildhgextindex,
1327 'install': hginstall,
1266 'install': hginstall,
1328 'install_lib': hginstalllib,
1267 'install_lib': hginstalllib,
1329 'install_data': hginstalldata,
1330 'install_scripts': hginstallscripts,
1268 'install_scripts': hginstallscripts,
1331 'build_hgexe': buildhgexe,
1269 'build_hgexe': buildhgexe,
1332 }
1270 }
General Comments 0
You need to be logged in to leave comments. Login now