This instance will be upgraded to Heptapod 0.27.1 on 2021-12-08 at 22:00 UTC+1 (a few minutes of down time)

Commit 8a8e28b2 authored by Jörg Sonnenberger's avatar Jörg Sonnenberger
Browse files

ci: test real dependency installation for pip [WIP]

In the past, the pip smoke test inhibited actual dependency
installation, but that fails in different environments for setuptools
itself. Since it isn't what we actually want to test (which is pip
install), allow this to call home.

WIP as this part of the test should only be run during CI.
parent bc3f3b59d0a4
Pipeline #17510 passed with stages
in 42 minutes and 52 seconds
......@@ -419,9 +419,9 @@ if os.path.isdir('.hg'):
ltag = sysstr(hg.run(ltagcmd))
changessincecmd = ['log', '-T', 'x\n', '-r', "only(.,'%s')" % ltag]
changessince = len(hg.run(changessincecmd).splitlines())
version = '%s+%s-%s' % (ltag, changessince, hgid)
version = '%s+hg%s.%s' % (ltag, changessince, hgid)
if version.endswith('+'):
version += time.strftime('%Y%m%d')
version = version[:-1] + 'local' + time.strftime('%Y%m%d')
elif os.path.exists('.hg_archival.txt'):
kw = dict(
[[t.strip() for t in l.split(':', 1)] for l in open('.hg_archival.txt')]
......@@ -430,11 +430,15 @@ elif os.path.exists('.hg_archival.txt'):
version = kw['tag']
elif 'latesttag' in kw:
if 'changessincelatesttag' in kw:
version = '%(latesttag)s+%(changessincelatesttag)s-%(node).12s' % kw
version = (
'%(latesttag)s' # +.%(changessincelatesttag)s.%(node).12s' % kw
)
else:
version = '%(latesttag)s+%(latesttagdistance)s-%(node).12s' % kw
version = (
'%(latesttag)s' # +.%(latesttagdistance)s.%(node).12s' % kw
)
else:
version = kw.get('node', '')[:12]
version = '0' # + kw.get('node', '')[:12]
if version:
versionb = version
......@@ -451,20 +455,6 @@ if version:
),
)
try:
oldpolicy = os.environ.get('HGMODULEPOLICY', None)
os.environ['HGMODULEPOLICY'] = 'py'
from mercurial import __version__
version = __version__.version
except ImportError:
version = b'unknown'
finally:
if oldpolicy is None:
del os.environ['HGMODULEPOLICY']
else:
os.environ['HGMODULEPOLICY'] = oldpolicy
class hgbuild(build):
# Insert hgbuildmo first so that files in mercurial/locale/ are found
......@@ -1683,8 +1673,8 @@ datafiles = []
# unicode on Python 2 still works because it won't contain any
# non-ascii bytes and will be implicitly converted back to bytes
# when operated on.
assert isinstance(version, bytes)
setupversion = version.decode('ascii')
assert isinstance(version, str)
setupversion = version
extra = {}
......
......@@ -197,8 +197,10 @@ our virtual env. Then pip doesn't think it's installed and doesn't try to build.
Note: we use this weird path to run pip and hg to avoid platform differences,
since it's bin on most platforms but Scripts on Windows.
$ ./installenv/*/pip install --no-index $TESTDIR/.. >> pip.log
$ ./installenv/*/pip install $TESTDIR/.. >> pip.log
Failed building wheel for mercurial (?)
WARNING: You are using pip version *; however, version * is available. (glob) (?)
You should consider upgrading via the '$TESTTMP/installenv/bin/python* -m pip install --upgrade pip' command. (glob) (?)
$ ./installenv/*/hg debuginstall || cat pip.log
checking encoding (ascii)...
checking Python executable (*) (glob)
......@@ -226,13 +228,13 @@ since it's bin on most platforms but Scripts on Windows.
Note: --no-site-packages is the default for all versions enabled by hghave
$ "$PYTHON" -m virtualenv --never-download installenv >> pip.log
$ "$PYTHON" -m virtualenv installenv >> pip.log
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. (?)
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support (?)
Note: we use this weird path to run pip and hg to avoid platform differences,
since it's bin on most platforms but Scripts on Windows.
$ ./installenv/*/pip install --no-index $TESTDIR/.. >> pip.log
$ ./installenv/*/pip install $TESTDIR/.. >> pip.log
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. (?)
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support (?)
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality. (?)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment