Skip to content

Commit

Permalink
fix CI failure due to #pypa/pip/issues/7778
Browse files Browse the repository at this point in the history
Signed-off-by: Bernat Gabor <bgabor8@bloomberg.net>
  • Loading branch information
gaborbernat committed Feb 24, 2020
1 parent 6ea52cb commit 63cbced
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@

setup(
use_scm_version={"write_to": "src/virtualenv/version.py", "write_to_template": '__version__ = "{version}"'},
setup_requires=["setuptools_scm >= 2"],
setup_requires=[
# this cannot be enabled until https://github.com/pypa/pip/issues/7778 is addressed
# "setuptools_scm >= 2"
],
)
4 changes: 3 additions & 1 deletion tests/unit/create/test_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ def test_create_no_seed(python, creator, isolated, system, coverage_env, special
# pypy cleans up file descriptors periodically so our (many) subprocess calls impact file descriptor limits
# force a cleanup of these on system where the limit is low-ish (e.g. MacOS 256)
gc.collect()
patch_files = {result.creator.purelib / "{}.{}".format("_distutils_patch_virtualenv", i) for i in ("py", "pth")}
purelib = result.creator.purelib
patch_files = {purelib / "{}.{}".format("_distutils_patch_virtualenv", i) for i in ("py", "pyc", "pth")}
patch_files.add(purelib / "__pycache__")
content = set(result.creator.purelib.iterdir()) - patch_files
assert not content, "\n".join(ensure_text(str(i)) for i in content)
assert result.creator.env_name == ensure_text(dest.name)
Expand Down
4 changes: 3 additions & 1 deletion tests/unit/seed/test_boostrap_link_via_app_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ def test_base_bootstrap_link_via_app_data(tmp_path, coverage_env, current_fastes
assert not process.returncode
# pip is greedy here, removing all packages removes the site-package too
if site_package.exists():
patch_files = {result.creator.purelib / "{}.{}".format("_distutils_patch_virtualenv", i) for i in ("py", "pth")}
purelib = result.creator.purelib
patch_files = {purelib / "{}.{}".format("_distutils_patch_virtualenv", i) for i in ("py", "pyc", "pth")}
patch_files.add(purelib / "__pycache__")
post_run = set(site_package.iterdir()) - patch_files
assert not post_run, "\n".join(str(i) for i in post_run)

Expand Down

0 comments on commit 63cbced

Please sign in to comment.