# HG changeset patch # User Matt Harbison # Date 1607986750 18000 # Node ID 3158522085f0b6e7ea73ed30c3e57f0d5a02690b # Parent dca9cb99971cfaf15ec714240aea08244040c858 setup: exclude the git extension from py2 builds 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. Differential Revision: https://phab.mercurial-scm.org/D9604 diff -r dca9cb99971c -r 3158522085f0 setup.py --- a/setup.py Mon Dec 14 14:59:23 2020 +0100 +++ b/setup.py Mon Dec 14 17:59:10 2020 -0500 @@ -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)