Patchwork [1,of,3,v2,pip-fix] setup: introduce dummy copies of setuptools flags

login
register
mail settings
Submitter Augie Fackler
Date June 8, 2017, 2:52 p.m.
Message ID <5a87da9a24af955df877.1496933528@augie-macbookpro2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/21247/
State Accepted
Headers show

Comments

Augie Fackler - June 8, 2017, 2:52 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1496761350 14400
#      Tue Jun 06 11:02:30 2017 -0400
# Node ID 5a87da9a24af955df877bef261557e2d63fd5e3a
# Parent  04c19c8082410049465e2cdc510e24801530c94b
setup: introduce dummy copies of setuptools flags

Since we're filtering out some egg gunk, we need to emulate these
flags which disable eggs so that pip still works.

Patch

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -469,6 +469,17 @@  class buildhgexe(build_ext):
         return os.path.join(self.build_temp, dir, 'hg.exe')
 
 class hginstall(install):
+
+    user_options = install.user_options + [
+        ('old-and-unmanageable', None,
+         'noop, present for eggless setuptools compat'),
+        ('single-version-externally-managed', None,
+         'noop, present for eggless setuptools compat'),
+    ]
+
+    # Also helps setuptools not be sad while we refuse to create eggs.
+    single_version_externally_managed = True
+
     def get_sub_commands(self):
         # Screen out egg related commands to prevent egg generation.  But allow
         # mercurial.egg-info generation, since that is part of modern