File tree 3 files changed +12
-38
lines changed
3 files changed +12
-38
lines changed Original file line number Diff line number Diff line change
1
+ ** 9.0.2 (2017-02-??) **
2
+
3
+ * Only check that setuptools appears to be installed but no longer test
4
+ the import before invoking a sdist build (:issue:`4264`).
5
+
6
+
1
7
**9.0.1 (2016-11-06)**
2
8
3
9
* Correct the deprecation message when not specifying a --format so that it
Original file line number Diff line number Diff line change @@ -383,17 +383,10 @@ def setup_py_dir(self):
383
383
@property
384
384
def setup_py (self ):
385
385
assert self .source_dir , "No source dir for %s" % self
386
- try :
387
- import setuptools # noqa
388
- except ImportError :
389
- if get_installed_version ('setuptools' ) is None :
390
- add_msg = "Please install setuptools."
391
- else :
392
- add_msg = traceback .format_exc ()
393
- # Setuptools is not available
394
- raise InstallationError (
395
- "Could not import setuptools which is required to "
396
- "install from a source distribution.\n %s" % add_msg
386
+ if get_installed_version ('setuptools' ) is None :
387
+ raise InstallationError ("Setuptools is required to install "
388
+ "from a source distribution, but none was found. Please "
389
+ "install setuptools."
397
390
)
398
391
399
392
setup_py = os .path .join (self .setup_py_dir , 'setup.py' )
Original file line number Diff line number Diff line change @@ -28,38 +28,13 @@ def test_without_setuptools(script, data):
28
28
expect_error = True ,
29
29
)
30
30
assert (
31
- "Could not import setuptools which is required to install from a "
32
- "source distribution ."
31
+ "Setuptools is required to install from a source distribution, but "
32
+ "none was found ."
33
33
in result .stderr
34
34
)
35
35
assert "Please install setuptools" in result .stderr
36
36
37
37
38
- def test_with_setuptools_and_import_error (script , data ):
39
- # Make sure we get an ImportError while importing setuptools
40
- setuptools_init_path = script .site_packages_path .join (
41
- "setuptools" , "__init__.py" )
42
- with open (setuptools_init_path , 'a' ) as f :
43
- f .write ('\n raise ImportError("toto")' )
44
-
45
- result = script .run (
46
- "python" , "-c" ,
47
- "import pip; pip.main(["
48
- "'install', "
49
- "'INITools==0.2', "
50
- "'-f', '%s', "
51
- "'--no-binary=:all:'])" % data .packages ,
52
- expect_error = True ,
53
- )
54
- assert (
55
- "Could not import setuptools which is required to install from a "
56
- "source distribution."
57
- in result .stderr
58
- )
59
- assert "Traceback " in result .stderr
60
- assert "ImportError: toto" in result .stderr
61
-
62
-
63
38
def test_pip_second_command_line_interface_works (script , data ):
64
39
"""
65
40
Check if ``pip<PYVERSION>`` commands behaves equally
You can’t perform that action at this time.
0 commit comments