diff options
-rw-r--r-- | MERGE.txt | 4 | ||||
-rwxr-xr-x | setuptools/command/easy_install.py | 6 | ||||
-rw-r--r-- | setuptools/tests/test_easy_install.py | 37 |
3 files changed, 5 insertions, 42 deletions
@@ -35,3 +35,7 @@ Minor Changes * The patch for `#174 <https://bitbucket.org/tarek/distribute/issue/174>`_ has been rolled-back, as the comment on the ticket indicates that the patch addressed a symptom and not the fundamental issue. +* ``easy_install`` (the command) once again honors setup.cfg if found in the + current directory. The "mis-behavior" characterized in `#99 + <https://bitbucket.org/tarek/distribute/issue/99>`_ is actually intended + behavior, and no substantial rationale was given for the deviation. diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 655478b3..47c1a3d8 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1925,12 +1925,6 @@ usage: %(script)s [options] requirement_or_url ... def _show_help(self,*args,**kw): with_ei_usage(lambda: Distribution._show_help(self,*args,**kw)) - def find_config_files(self): - files = Distribution.find_config_files(self) - if 'setup.cfg' in files: - files.remove('setup.cfg') - return files - if argv is None: argv = sys.argv[1:] diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 4a65a8d2..395056e7 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -13,7 +13,7 @@ import StringIO import distutils.core from setuptools.sandbox import run_setup, SandboxViolation -from setuptools.command.easy_install import easy_install, fix_jython_executable, get_script_args, main +from setuptools.command.easy_install import easy_install, fix_jython_executable, get_script_args from setuptools.command.easy_install import PthDistributions from setuptools.command import easy_install as easy_install_pkg from setuptools.dist import Distribution @@ -84,41 +84,6 @@ class TestEasyInstallTest(unittest.TestCase): self.assertEqual(script, WANTED) - def test_no_setup_cfg(self): - # makes sure easy_install as a command (main) - # doesn't use a setup.cfg file that is located - # in the current working directory - dir = tempfile.mkdtemp() - setup_cfg = open(os.path.join(dir, 'setup.cfg'), 'w') - setup_cfg.write('[easy_install]\nfind_links = http://example.com') - setup_cfg.close() - setup_py = open(os.path.join(dir, 'setup.py'), 'w') - setup_py.write(SETUP_PY) - setup_py.close() - - from setuptools.dist import Distribution - - def _parse_command_line(self): - msg = 'Error: a local setup.cfg was used' - opts = self.command_options - if 'easy_install' in opts: - assert 'find_links' not in opts['easy_install'], msg - return self._old_parse_command_line() - - Distribution._old_parse_command_line = Distribution.parse_command_line - Distribution.parse_command_line = _parse_command_line - - old_wd = os.getcwd() - try: - os.chdir(dir) - reset_setup_stop_context( - lambda: self.assertRaises(SystemExit, main, []) - ) - finally: - os.chdir(old_wd) - shutil.rmtree(dir) - Distribution.parse_command_line = Distribution._old_parse_command_line - def test_no_find_links(self): # new option '--no-find-links', that blocks find-links added at # the project level |