Patchwork D9803: test-regression: backing out D9640 (63c923fd7fa8)

login
register
mail settings
Submitter phabricator
Date Jan. 17, 2021, 1:49 a.m.
Message ID <differential-rev-PHID-DREV-3h3pxmxupc5t7yujn6vq-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48114/
State Superseded
Headers show

Comments

phabricator - Jan. 17, 2021, 1:49 a.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Since D9640 <https://phab.mercurial-scm.org/D9640> was pushed, we have seen failure on at least:
  
  - test-commit-interactive.t
  - test-i18n.t
  - test-log.t
  
  The author that change requested it to be removed until he can investigate.
  
  For reference: https://phab.mercurial-scm.org/D9640
  
  Backed out changeset 63c923fd7fa8 <https://phab.mercurial-scm.org/rHG63c923fd7fa8fec32b8c000fd970576a785d07ec>

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9803

AFFECTED FILES
  setup.py

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -196,7 +196,6 @@ 
 from distutils.command.build_py import build_py
 from distutils.command.build_scripts import build_scripts
 from distutils.command.install import install
-from distutils.command.install_data import install_data
 from distutils.command.install_lib import install_lib
 from distutils.command.install_scripts import install_scripts
 from distutils import log
@@ -213,12 +212,6 @@ 
 # Explain to distutils.StrictVersion how our release candidates are versionned
 StrictVersion.version_re = re.compile(r'^(\d+)\.(\d+)(\.(\d+))?-?(rc(\d+))?$')
 
-# Can we build the documentation?
-try:
-    import docutils
-except ImportError:
-    docutils = None
-
 
 def write_if_changed(path, content):
     """Write content to a file iff the content hasn't changed."""
@@ -478,14 +471,6 @@ 
     # when build_py is run next.
     sub_commands = [('build_mo', None)] + build.sub_commands
 
-    def run(self):
-        if os.name == 'nt':
-            pass
-        elif docutils is None:
-            log.warn('not building optional documentation')
-        else:
-            self.run_command('build_doc')
-
 
 class hgbuildmo(build):
 
@@ -1055,43 +1040,6 @@ 
                 genhtml(root)
 
 
-class hginstalldata(install_data):
-    user_options = install_data.user_options + [
-        (
-            'install-man=',
-            None,
-            'installation directory for manual pages [share/man]',
-        ),
-    ]
-
-    install_man = None
-
-    def finalize_options(self):
-        install_data.finalize_options(self)
-
-        self.set_undefined_options('install', ('install_man', 'install_man'))
-
-        if self.install_man is None:
-            self.install_man = os.path.join('share', 'man')
-
-        if os.name == 'nt':
-            pass
-        elif docutils is None:
-            log.warn('not installing manual pages')
-        else:
-            manpages = [
-                f for f in os.listdir('doc') if re.search(r'\.[0-9]$', f)
-            ]
-
-            self.data_files += [
-                (
-                    os.path.join(self.install_man, 'man' + ext[1:]),
-                    ['doc/' + f for f in manpages if f.endswith(ext)],
-                )
-                for ext in set(os.path.splitext(f)[1] for f in manpages)
-            ]
-
-
 class hginstall(install):
 
     user_options = install.user_options + [
@@ -1105,26 +1053,17 @@ 
             None,
             'noop, present for eggless setuptools compat',
         ),
-        (
-            'install-man=',
-            None,
-            'installation directory for manual pages [share/man]',
-        ),
     ]
 
     # Also helps setuptools not be sad while we refuse to create eggs.
     single_version_externally_managed = True
 
-    install_man = None
-
     def get_sub_commands(self):
-        subcommands = install.get_sub_commands(self)
-        subcommands.append('install_data')
         # Screen out egg related commands to prevent egg generation.  But allow
         # mercurial.egg-info generation, since that is part of modern
         # packaging.
         excl = {'bdist_egg'}
-        return filter(lambda x: x not in excl, subcommands)
+        return filter(lambda x: x not in excl, install.get_sub_commands(self))
 
 
 class hginstalllib(install_lib):
@@ -1326,7 +1265,6 @@ 
     'build_hgextindex': buildhgextindex,
     'install': hginstall,
     'install_lib': hginstalllib,
-    'install_data': hginstalldata,
     'install_scripts': hginstallscripts,
     'build_hgexe': buildhgexe,
 }