|
1 | 1 | import itertools
|
2 | 2 | import os
|
3 |
| -import sys |
4 | 3 | import textwrap
|
5 | 4 |
|
6 | 5 | import pytest
|
@@ -352,54 +351,6 @@ def test_upgrade_vcs_req_with_dist_found(script):
|
352 | 351 | assert "pypi.org" not in result.stdout, result.stdout
|
353 | 352 |
|
354 | 353 |
|
355 |
| -class TestUpgradeDistributeToSetuptools: |
356 |
| - """ |
357 |
| - From pip1.4 to pip6, pip supported a set of "hacks" (see Issue #1122) to |
358 |
| - allow distribute to conflict with setuptools, so that the following would |
359 |
| - work to upgrade distribute: |
360 |
| -
|
361 |
| - ``pip install -U setuptools`` |
362 |
| -
|
363 |
| - In pip7, the hacks were removed. This test remains to at least confirm pip |
364 |
| - can upgrade distribute to setuptools using: |
365 |
| -
|
366 |
| - ``pip install -U distribute`` |
367 |
| -
|
368 |
| - The reason this works is that a final version of distribute (v0.7.3) was |
369 |
| - released that is simple wrapper with: |
370 |
| -
|
371 |
| - install_requires=['setuptools>=0.7'] |
372 |
| -
|
373 |
| - The test use a fixed set of packages from our test packages dir. Note that |
374 |
| - virtualenv-1.9.1 contains distribute-0.6.34 and virtualenv-1.10 contains |
375 |
| - setuptools-0.9.7 |
376 |
| - """ |
377 |
| - |
378 |
| - def prep_ve(self, script, version, pip_src, distribute=False): |
379 |
| - self.script = script |
380 |
| - self.script.pip_install_local(f"virtualenv=={version}") |
381 |
| - args = ["virtualenv", self.script.scratch_path / "VE"] |
382 |
| - if distribute: |
383 |
| - args.insert(1, "--distribute") |
384 |
| - if version == "1.9.1" and not distribute: |
385 |
| - # setuptools 0.6 didn't support PYTHONDONTWRITEBYTECODE |
386 |
| - del self.script.environ["PYTHONDONTWRITEBYTECODE"] |
387 |
| - self.script.run(*args) |
388 |
| - if sys.platform == "win32": |
389 |
| - bindir = "Scripts" |
390 |
| - else: |
391 |
| - bindir = "bin" |
392 |
| - self.ve_bin = self.script.scratch_path / "VE" / bindir |
393 |
| - self.script.run(self.ve_bin / "pip", "uninstall", "-y", "pip") |
394 |
| - self.script.run( |
395 |
| - self.ve_bin / "python", |
396 |
| - "setup.py", |
397 |
| - "install", |
398 |
| - cwd=pip_src, |
399 |
| - expect_stderr=True, |
400 |
| - ) |
401 |
| - |
402 |
| - |
403 | 354 | @pytest.mark.parametrize(
|
404 | 355 | "req1, req2",
|
405 | 356 | list(
|
|
0 commit comments