Patchwork D9604: setup: exclude the git extension from py2 builds

login
register
mail settings
Submitter phabricator
Date Dec. 15, 2020, 12:37 a.m.
Message ID <differential-rev-PHID-DREV-y6yniikh5mhor2ekcxde-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/47903/
State Superseded
Headers show

Comments

phabricator - Dec. 15, 2020, 12:37 a.m.
mharbison72 created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This can't be built on Windows with the py2 compiler, and while old versions can
  be installed via pip on Linux, I can't get the tests to run (even with py3.8)
  using pygit2 0.28.2.  Some manually run commands work, and others spew stack
  traces that don't occur with the current 1.4.0 release using py3.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  setup.py

CHANGE DETAILS




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

Patch

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -1309,6 +1309,13 @@ 
     'hgdemandimport',
 ]
 
+# The pygit2 dependency dropped py2 support with the 1.0 release in Dec 2019.
+# Prior releases do not build at all on Windows, because Visual Studio 2008
+# doesn't understand C 11.  Older Linux releases are buggy.
+if sys.version_info[0] == 2:
+    packages.remove('hgext.git')
+
+
 for name in os.listdir(os.path.join('mercurial', 'templates')):
     if name != '__pycache__' and os.path.isdir(
         os.path.join('mercurial', 'templates', name)