From 16361e51b834153f2e0e96897ebf33163c18016b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 9 Jun 2016 15:14:16 -0400 Subject: Remove ARM launchers. Fixes #611. --- setuptools/command/easy_install.py | 3 --- 1 file changed, 3 deletions(-) (limited to 'setuptools/command') diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index ccc66cf7..9ca1554e 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -32,7 +32,6 @@ import zipfile import re import stat import random -import platform import textwrap import warnings import site @@ -2203,8 +2202,6 @@ def get_win_launcher(type): Returns the executable as a byte string. """ launcher_fn = '%s.exe' % type - if platform.machine().lower() == 'arm': - launcher_fn = launcher_fn.replace(".", "-arm.") if is_64bit(): launcher_fn = launcher_fn.replace(".", "-64.") else: -- cgit v1.2.1 From 3cee4d8f79a20f1d67b194ee383dddd826695e0d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 Jun 2016 09:44:52 -0400 Subject: Nicer indentation --- setuptools/command/egg_info.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'setuptools/command') diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 8e1502a5..829f03f9 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -52,8 +52,10 @@ class egg_info(Command): ] boolean_options = ['tag-date', 'tag-svn-revision'] - negative_opt = {'no-svn-revision': 'tag-svn-revision', - 'no-date': 'tag-date'} + negative_opt = { + 'no-svn-revision': 'tag-svn-revision', + 'no-date': 'tag-date', + } def initialize_options(self): self.egg_name = None -- cgit v1.2.1 From 542a921bb6943feb1c90874ba5151c94622b52b3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 Jun 2016 10:17:41 -0400 Subject: Mark tag_svn_revision as deprecated. Ref #619. --- setuptools/command/egg_info.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'setuptools/command') diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 829f03f9..5183eedc 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -199,6 +199,10 @@ class egg_info(Command): if self.tag_build: version += self.tag_build if self.tag_svn_revision: + warnings.warn( + "tag_svn_revision is deprecated and will not be honored " + "in a future release" + ) version += '-r%s' % self.get_svn_revision() if self.tag_date: version += time.strftime("-%Y%m%d") -- cgit v1.2.1 From 3132833570c90d52f6c2a422506732e82d772cdd Mon Sep 17 00:00:00 2001 From: Felix Krull Date: Sun, 26 Jun 2016 01:48:30 +0200 Subject: Ensure shebang lines are correctly quoted if sys.executable contains spaces. Fixes issue #398. This only special-cases sys.executable; if the --executable parameter is used, paths with spaces have to be quoted there explicitly. While this change also applies to Unix platforms, if sys.executable contains spaces on Unix, any shebang lines created with it aren't going to work either way, whether they are quoted or not. --- setuptools/command/easy_install.py | 11 ++++++++++- setuptools/command/install_scripts.py | 5 +++++ 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'setuptools/command') diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 9ca1554e..d63fb529 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1985,9 +1985,18 @@ class CommandSpec(list): def as_header(self): return self._render(self + list(self.options)) + @staticmethod + def _strip_quotes(item): + _QUOTES = '"\'' + for q in _QUOTES: + if item.startswith(q) and item.endswith(q): + return item[1:-1] + return item + @staticmethod def _render(items): - cmdline = subprocess.list2cmdline(items) + cmdline = subprocess.list2cmdline( + CommandSpec._strip_quotes(item.strip()) for item in items) return '#!' + cmdline + '\n' # For pbr compat; will be removed in a future version. diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py index be66cb22..16234273 100755 --- a/setuptools/command/install_scripts.py +++ b/setuptools/command/install_scripts.py @@ -1,6 +1,7 @@ from distutils import log import distutils.command.install_scripts as orig import os +import sys from pkg_resources import Distribution, PathMetadata, ensure_directory @@ -37,6 +38,10 @@ class install_scripts(orig.install_scripts): if is_wininst: exec_param = "python.exe" writer = ei.WindowsScriptWriter + if exec_param == sys.executable: + # In case the path to the Python executable contains a space, wrap + # it so it's not split up. + exec_param = [exec_param] # resolve the writer to the environment writer = writer.best() cmd = writer.command_spec_class.best().from_param(exec_param) -- cgit v1.2.1 From 4720c481c62d5cc0a40dd212a32c641125be8e9c Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 29 Jun 2016 10:22:12 +0200 Subject: Don't use deprecated 'U' flag to read manifest The universal newlines mode ('U' flag) is deprecated since Python 3.4. It only replaces "\r\n" with "\n", but it doesn't split lines at "\r" (Mac newline). In practice, the flag was useless, the sdist.read_manifest() method already uses line.strip() and so removes newline characters. --- setuptools/command/sdist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'setuptools/command') diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 6640d4e3..f200b946 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -179,7 +179,7 @@ class sdist(orig.sdist): distribution. """ log.info("reading manifest file '%s'", self.manifest) - manifest = open(self.manifest, 'rbU') + manifest = open(self.manifest, 'rb') for line in manifest: # The manifest must contain UTF-8. See #303. if six.PY3: -- cgit v1.2.1 From 6d11e88f938f09ef16db4c6064b6e74acba4db1d Mon Sep 17 00:00:00 2001 From: stepshal Date: Tue, 12 Jul 2016 22:00:43 +0700 Subject: Fix quantity of blank lines after code object. --- setuptools/command/bdist_wininst.py | 1 + setuptools/command/build_ext.py | 2 ++ setuptools/command/build_py.py | 1 + setuptools/command/develop.py | 1 + setuptools/command/easy_install.py | 1 + setuptools/command/install_lib.py | 1 + setuptools/command/sdist.py | 1 + setuptools/command/test.py | 2 ++ 8 files changed, 10 insertions(+) (limited to 'setuptools/command') diff --git a/setuptools/command/bdist_wininst.py b/setuptools/command/bdist_wininst.py index 073de97b..8243c917 100755 --- a/setuptools/command/bdist_wininst.py +++ b/setuptools/command/bdist_wininst.py @@ -2,6 +2,7 @@ import distutils.command.bdist_wininst as orig class bdist_wininst(orig.bdist_wininst): + def reinitialize_command(self, command, reinit_subcommands=0): """ Supplement reinitialize_command to work around diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index 1caf8c81..e6db0764 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -59,7 +59,9 @@ elif os.name != 'nt': if_dl = lambda s: s if have_rtld else '' + class build_ext(_build_ext): + def run(self): """Build extensions in build directory, then copy if --inplace""" old_inplace, self.inplace = self.inplace, 0 diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 0bad8295..b5de9bda 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -15,6 +15,7 @@ try: from setuptools.lib2to3_ex import Mixin2to3 except ImportError: class Mixin2to3: + def run_2to3(self, files, doctests=True): "do nothing" diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index 11b5df10..3eb86120 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -186,6 +186,7 @@ class VersionlessRequirement(object): >>> str(adapted_dist.as_requirement()) 'foo' """ + def __init__(self, dist): self.__dist = dist diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 9ca1554e..73bdb0cb 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -2158,6 +2158,7 @@ class WindowsScriptWriter(ScriptWriter): class WindowsExecutableLauncherWriter(WindowsScriptWriter): + @classmethod def _get_script_args(cls, type_, name, header, script_text): """ diff --git a/setuptools/command/install_lib.py b/setuptools/command/install_lib.py index 78fe6891..2b31c3e3 100644 --- a/setuptools/command/install_lib.py +++ b/setuptools/command/install_lib.py @@ -3,6 +3,7 @@ import imp from itertools import product, starmap import distutils.command.install_lib as orig + class install_lib(orig.install_lib): """Don't add compiled flags to filenames of non-Python files""" diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index f200b946..041ee42e 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -15,6 +15,7 @@ READMES = 'README', 'README.rst', 'README.txt' _default_revctrl = list + def walk_revctrl(dirname=''): """Find all files under revision control""" for ep in pkg_resources.iter_entry_points('setuptools.file_finders'): diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 39746a02..2d1adba8 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -14,6 +14,7 @@ from setuptools.py31compat import unittest_main class ScanningLoader(TestLoader): + def loadTestsFromModule(self, module, pattern=None): """Return a suite of all tests cases contained in the given module @@ -46,6 +47,7 @@ class ScanningLoader(TestLoader): # adapted from jaraco.classes.properties:NonDataProperty class NonDataProperty(object): + def __init__(self, fget): self.fget = fget -- cgit v1.2.1 From 01de794bc829cc9eb0c1512b3570acec970e1acf Mon Sep 17 00:00:00 2001 From: stepshal Date: Thu, 14 Jul 2016 21:45:22 +0700 Subject: Put imports in same block alphabeticaly. --- setuptools/command/bdist_egg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'setuptools/command') diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 9cebd7fa..c40022a1 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -8,8 +8,8 @@ from distutils import log from types import CodeType import sys import os -import marshal import textwrap +import marshal from setuptools.extern import six -- cgit v1.2.1 From c07d0df02c9a22838099e1d86f31015d19c92a87 Mon Sep 17 00:00:00 2001 From: stepshal Date: Thu, 14 Jul 2016 21:52:34 +0700 Subject: Use isinstance() instead of type() for a typecheck. --- setuptools/command/upload_docs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'setuptools/command') diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 01b49046..ccc1c76f 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -105,7 +105,7 @@ class upload_docs(upload): if not isinstance(values, list): values = [values] for value in values: - if type(value) is tuple: + if isinstance(value, tuple): title += '; filename="%s"' % value[0] value = value[1] else: -- cgit v1.2.1 From 39bf3155d47c0024240be414a611dcb6d549f53c Mon Sep 17 00:00:00 2001 From: stepshal Date: Thu, 21 Jul 2016 09:37:34 +0700 Subject: Add missing blank lines after class or function definition. --- setuptools/command/bdist_egg.py | 1 + setuptools/command/easy_install.py | 2 ++ 2 files changed, 3 insertions(+) (limited to 'setuptools/command') diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index c40022a1..50744b87 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -432,6 +432,7 @@ def can_scan(): # Attribute names of options for commands that might need to be convinced to # install to the egg build directory + INSTALL_DIRECTORY_ATTRS = [ 'install_lib', 'install_dir', 'install_data', 'install_base' ] diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 73bdb0cb..5ce529b2 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1831,6 +1831,7 @@ def _remove_and_clear_zip_directory_cache_data(normalized_path): normalized_path, zipimport._zip_directory_cache, updater=clear_and_remove_cached_zip_archive_directory_data) + # PyPy Python implementation does not allow directly writing to the # zipimport._zip_directory_cache and so prevents us from attempting to correct # its content. The best we can do there is clear the problematic cache content @@ -1990,6 +1991,7 @@ class CommandSpec(list): cmdline = subprocess.list2cmdline(items) return '#!' + cmdline + '\n' + # For pbr compat; will be removed in a future version. sys_executable = CommandSpec._sys_executable() -- cgit v1.2.1 From 9f77a068c02a3937762b8292c20e06d072247825 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 21 Jul 2016 12:14:42 -0400 Subject: Disable os.link during make_distribution. Fixes #516. Note that better would be if sdist provided some sort of hooks to better control the file copying, but since it does not, this technique will suffice for now. --- setuptools/command/sdist.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'setuptools/command') diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 041ee42e..b86aae50 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -4,6 +4,7 @@ import distutils.command.sdist as orig import os import sys import io +import contextlib from setuptools.extern import six @@ -65,6 +66,32 @@ class sdist(orig.sdist): if data not in dist_files: dist_files.append(data) + def make_distribution(self): + """ + Workaround for #516 + """ + with self._remove_os_link(): + orig.sdist.make_distribution(self) + + @staticmethod + @contextlib.contextmanager + def _remove_os_link(): + """ + In a context, remove and restore os.link if it exists + """ + class NoValue: + pass + orig_val = getattr(os, 'link', NoValue) + try: + del os.link + except Exception: + pass + try: + yield + finally: + if orig_val is not NoValue: + setattr(os, 'link', orig_val) + def __read_template_hack(self): # This grody hack closes the template file (MANIFEST.in) if an # exception occurs during read_template. -- cgit v1.2.1 From b3b8a8d106ecf9dbdb933f4f2a09ec65003b7d05 Mon Sep 17 00:00:00 2001 From: stepshal Date: Fri, 22 Jul 2016 12:56:21 +0700 Subject: Use 'except Exception:' instead of 'except:'. --- setuptools/command/easy_install.py | 4 ++-- setuptools/command/sdist.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'setuptools/command') diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 5ce529b2..468b9be7 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -431,7 +431,7 @@ class easy_install(Command): """ try: pid = os.getpid() - except: + except Exception: pid = random.randint(0, sys.maxsize) return os.path.join(self.install_dir, "test-easy-install-%s" % pid) @@ -929,7 +929,7 @@ class easy_install(Command): destination, fix_zipimporter_caches=new_dist_is_zipped, ) - except: + except Exception: update_dist_caches(destination, fix_zipimporter_caches=False) raise diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index b86aae50..b6125f58 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -99,7 +99,7 @@ class sdist(orig.sdist): # file. try: orig.sdist.read_template(self) - except: + except Exception: _, _, tb = sys.exc_info() tb.tb_next.tb_frame.f_locals['template'].close() raise -- cgit v1.2.1 From e211f4584ac59f404a3e1a17c6b54dff18468cf6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Jul 2016 04:17:27 -0400 Subject: Set sys path technique to raw by default. Fixes #674. --- setuptools/command/easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'setuptools/command') diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 19f8286b..0e0dc2c4 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1661,7 +1661,7 @@ class RewritePthDistributions(PthDistributions): """) -if os.environ.get('SETUPTOOLS_SYS_PATH_TECHNIQUE', 'rewrite') == 'rewrite': +if os.environ.get('SETUPTOOLS_SYS_PATH_TECHNIQUE', 'raw') == 'rewrite': PthDistributions = RewritePthDistributions -- cgit v1.2.1 From 15e0f14c1a7275a944c8c0c3f0f0e4badefa646a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 29 Jul 2016 23:54:30 -0400 Subject: Remove copy of rmtree, as Python 2.3 is no longer supported. --- setuptools/command/easy_install.py | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) (limited to 'setuptools/command') diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 0e0dc2c4..ae9079d8 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -2230,39 +2230,7 @@ def load_launcher_manifest(name): def rmtree(path, ignore_errors=False, onerror=auto_chmod): - """Recursively delete a directory tree. - - This code is taken from the Python 2.4 version of 'shutil', because - the 2.3 version doesn't really work right. - """ - if ignore_errors: - def onerror(*args): - pass - elif onerror is None: - def onerror(*args): - raise - names = [] - try: - names = os.listdir(path) - except os.error: - onerror(os.listdir, path, sys.exc_info()) - for name in names: - fullname = os.path.join(path, name) - try: - mode = os.lstat(fullname).st_mode - except os.error: - mode = 0 - if stat.S_ISDIR(mode): - rmtree(fullname, ignore_errors, onerror) - else: - try: - os.remove(fullname) - except os.error: - onerror(os.remove, fullname, sys.exc_info()) - try: - os.rmdir(path) - except os.error: - onerror(os.rmdir, path, sys.exc_info()) + return shutil.rmtree(path, ignore_errors, onerror) def current_umask(): -- cgit v1.2.1 From 857949575022946cc60c7cd1d0d088246d3f7540 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 30 Jul 2016 11:05:33 -0400 Subject: Ensure that tmpdir is unicode. Fixes #704. --- setuptools/command/easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'setuptools/command') diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index ae9079d8..4783ce48 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -627,7 +627,7 @@ class easy_install(Command): ) def easy_install(self, spec, deps=False): - tmpdir = tempfile.mkdtemp(prefix="easy_install-") + tmpdir = tempfile.mkdtemp(prefix=six.u("easy_install-")) if not self.editable: self.install_site_py() -- cgit v1.2.1 From b822e86d4b41cd54c12e6d5fdf3f7d00e89bb4d4 Mon Sep 17 00:00:00 2001 From: Mehdi Abaakouk Date: Tue, 2 Aug 2016 13:31:38 +0200 Subject: Revert "Ensure that tmpdir is unicode. Fixes #704." This reverts commit 857949575022946cc60c7cd1d0d088246d3f7540. As we can see on https://github.com/pypa/setuptools/issues/709, this breaks many things (easy_install C extensions, all py3.5 tests, run with LANG=C). So instead of fixing in a hurry all new bugs due to this, I propose to revert this commit until all downsides of this change have been investigated. Related bug: https://github.com/pypa/setuptools/issues/709 Related bug: https://github.com/pypa/setuptools/issues/710 Related bug: https://github.com/pypa/setuptools/issues/712 --- setuptools/command/easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'setuptools/command') diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 4783ce48..ae9079d8 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -627,7 +627,7 @@ class easy_install(Command): ) def easy_install(self, spec, deps=False): - tmpdir = tempfile.mkdtemp(prefix=six.u("easy_install-")) + tmpdir = tempfile.mkdtemp(prefix="easy_install-") if not self.editable: self.install_site_py() -- cgit v1.2.1 From 18c0fdab26ba13a9cf142408d7f1f2566be21fa7 Mon Sep 17 00:00:00 2001 From: Valentin Valls Date: Wed, 3 Aug 2016 13:55:56 +0200 Subject: Fix logging using arguments instead of formatter --- setuptools/command/bdist_egg.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'setuptools/command') diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 50744b87..cbea7537 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -129,7 +129,7 @@ class bdist_egg(Command): self.distribution.data_files.append(item) try: - log.info("installing package data to %s" % self.bdist_dir) + log.info("installing package data to %s", self.bdist_dir) self.call_command('install_data', force=0, root=None) finally: self.distribution.data_files = old @@ -152,7 +152,7 @@ class bdist_egg(Command): self.run_command("egg_info") # We run install_lib before install_data, because some data hacks # pull their data path from the install_lib command. - log.info("installing library code to %s" % self.bdist_dir) + log.info("installing library code to %s", self.bdist_dir) instcmd = self.get_finalized_command('install') old_root = instcmd.root instcmd.root = None @@ -169,7 +169,7 @@ class bdist_egg(Command): pyfile = os.path.join(self.bdist_dir, strip_module(filename) + '.py') self.stubs.append(pyfile) - log.info("creating stub loader for %s" % ext_name) + log.info("creating stub loader for %s", ext_name) if not self.dry_run: write_stub(os.path.basename(ext_name), pyfile) to_compile.append(pyfile) @@ -186,14 +186,14 @@ class bdist_egg(Command): self.mkpath(egg_info) if self.distribution.scripts: script_dir = os.path.join(egg_info, 'scripts') - log.info("installing scripts to %s" % script_dir) + log.info("installing scripts to %s", script_dir) self.call_command('install_scripts', install_dir=script_dir, no_ep=1) self.copy_metadata_to(egg_info) native_libs = os.path.join(egg_info, "native_libs.txt") if all_outputs: - log.info("writing %s" % native_libs) + log.info("writing %s", native_libs) if not self.dry_run: ensure_directory(native_libs) libs_file = open(native_libs, 'wt') @@ -201,7 +201,7 @@ class bdist_egg(Command): libs_file.write('\n') libs_file.close() elif os.path.isfile(native_libs): - log.info("removing %s" % native_libs) + log.info("removing %s", native_libs) if not self.dry_run: os.unlink(native_libs) @@ -458,7 +458,7 @@ def make_zipfile(zip_filename, base_dir, verbose=0, dry_run=0, compress=True, p = path[len(base_dir) + 1:] if not dry_run: z.write(path, p) - log.debug("adding '%s'" % p) + log.debug("adding '%s'", p) compression = zipfile.ZIP_DEFLATED if compress else zipfile.ZIP_STORED if not dry_run: -- cgit v1.2.1 From a2605b297c147a1ad54078181d32fe369fa4f37d Mon Sep 17 00:00:00 2001 From: Daniel Holth Date: Wed, 3 Aug 2016 21:55:39 -0400 Subject: use abi3 extension if Extension().is_abi3 --- setuptools/command/build_ext.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'setuptools/command') diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index e6db0764..dad28999 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -59,6 +59,14 @@ elif os.name != 'nt': if_dl = lambda s: s if have_rtld else '' +def get_abi3_suffix(): + """Return the file extension for an abi3-compliant Extension()""" + import imp + for suffix, _, _ in (s for s in imp.get_suffixes() if s[2] == imp.C_EXTENSION): + if '.abi3' in suffix: # Unix + return suffix + elif suffix == '.pyd': # Windows + return suffix class build_ext(_build_ext): @@ -96,6 +104,11 @@ class build_ext(_build_ext): filename = _build_ext.get_ext_filename(self, fullname) if fullname in self.ext_map: ext = self.ext_map[fullname] + if sys.version_info[0] != 2 and getattr(ext, 'is_abi3'): + from distutils.sysconfig import get_config_var + so_ext = get_config_var('SO') + filename = filename[:-len(so_ext)] + filename = filename + get_abi3_suffix() if isinstance(ext, Library): fn, ext = os.path.splitext(filename) return self.shlib_compiler.library_filename(fn, libtype) -- cgit v1.2.1 From 702a4277768f0781e3d0a4cf770d29621f7f2cc3 Mon Sep 17 00:00:00 2001 From: Daniel Holth Date: Fri, 5 Aug 2016 07:55:57 -0400 Subject: rename is_abi3 to py_limited_api --- setuptools/command/build_ext.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'setuptools/command') diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index dad28999..7bb4d24c 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -104,7 +104,9 @@ class build_ext(_build_ext): filename = _build_ext.get_ext_filename(self, fullname) if fullname in self.ext_map: ext = self.ext_map[fullname] - if sys.version_info[0] != 2 and getattr(ext, 'is_abi3'): + if (sys.version_info[0] != 2 + and getattr(ext, 'py_limited_api') + and get_abi3_suffix()): from distutils.sysconfig import get_config_var so_ext = get_config_var('SO') filename = filename[:-len(so_ext)] -- cgit v1.2.1 From 853a9df48cc056a07e17511a2b65918af9605bbc Mon Sep 17 00:00:00 2001 From: Ofekmeister Date: Tue, 16 Aug 2016 02:12:38 -0400 Subject: Fix issue #459 Patched sys.argv[0] before loading entry point --- setuptools/command/easy_install.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'setuptools/command') diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index ae9079d8..e2a7dc46 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -2022,6 +2022,8 @@ class ScriptWriter(object): from pkg_resources import load_entry_point if __name__ == '__main__': + import re + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) sys.exit( load_entry_point(%(spec)r, %(group)r, %(name)r)() ) -- cgit v1.2.1 From c7ee084a4e94b2061f50b7a6633f814cf3caf615 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 19 Aug 2016 16:02:23 -0400 Subject: Reorganize imports --- setuptools/command/build_ext.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'setuptools/command') diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index 7bb4d24c..81d0c32c 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -1,12 +1,12 @@ +import os +import sys +import itertools from distutils.command.build_ext import build_ext as _du_build_ext from distutils.file_util import copy_file from distutils.ccompiler import new_compiler from distutils.sysconfig import customize_compiler from distutils.errors import DistutilsError from distutils import log -import os -import sys -import itertools from setuptools.extension import Library @@ -104,7 +104,7 @@ class build_ext(_build_ext): filename = _build_ext.get_ext_filename(self, fullname) if fullname in self.ext_map: ext = self.ext_map[fullname] - if (sys.version_info[0] != 2 + if (sys.version_info[0] != 2 and getattr(ext, 'py_limited_api') and get_abi3_suffix()): from distutils.sysconfig import get_config_var -- cgit v1.2.1 From a3a04186f0b0b8fb9206f2813a768d655a7acc04 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 19 Aug 2016 16:02:39 -0400 Subject: Move import to top --- setuptools/command/build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'setuptools/command') diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index 81d0c32c..df8f03fc 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -1,6 +1,7 @@ import os import sys import itertools +import imp from distutils.command.build_ext import build_ext as _du_build_ext from distutils.file_util import copy_file from distutils.ccompiler import new_compiler @@ -61,7 +62,6 @@ if_dl = lambda s: s if have_rtld else '' def get_abi3_suffix(): """Return the file extension for an abi3-compliant Extension()""" - import imp for suffix, _, _ in (s for s in imp.get_suffixes() if s[2] == imp.C_EXTENSION): if '.abi3' in suffix: # Unix return suffix -- cgit v1.2.1 From e3b053192c96cc247c3e12dae78923631397dce7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 19 Aug 2016 16:05:04 -0400 Subject: Move import to the top --- setuptools/command/build_ext.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'setuptools/command') diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index df8f03fc..ca46b22a 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -5,7 +5,7 @@ import imp from distutils.command.build_ext import build_ext as _du_build_ext from distutils.file_util import copy_file from distutils.ccompiler import new_compiler -from distutils.sysconfig import customize_compiler +from distutils.sysconfig import customize_compiler, get_config_var from distutils.errors import DistutilsError from distutils import log @@ -17,10 +17,8 @@ try: except ImportError: _build_ext = _du_build_ext -from distutils.sysconfig import get_config_var - -get_config_var("LDSHARED") # make sure _config_vars is initialized -del get_config_var +# make sure _config_vars is initialized +get_config_var("LDSHARED") from distutils.sysconfig import _config_vars as _CONFIG_VARS @@ -107,7 +105,6 @@ class build_ext(_build_ext): if (sys.version_info[0] != 2 and getattr(ext, 'py_limited_api') and get_abi3_suffix()): - from distutils.sysconfig import get_config_var so_ext = get_config_var('SO') filename = filename[:-len(so_ext)] filename = filename + get_abi3_suffix() -- cgit v1.2.1 From 097e92abaa7b72815a5eb9c232293ef4bbc1b626 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 19 Aug 2016 16:06:58 -0400 Subject: Extract variable for boolean expression for nicer indentation. --- setuptools/command/build_ext.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'setuptools/command') diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index ca46b22a..9caabfd5 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -10,6 +10,7 @@ from distutils.errors import DistutilsError from distutils import log from setuptools.extension import Library +from setuptools.extern import six try: # Attempt to use Cython for building extensions, if available @@ -102,9 +103,12 @@ class build_ext(_build_ext): filename = _build_ext.get_ext_filename(self, fullname) if fullname in self.ext_map: ext = self.ext_map[fullname] - if (sys.version_info[0] != 2 + use_abi3 = ( + six.PY3 and getattr(ext, 'py_limited_api') - and get_abi3_suffix()): + and get_abi3_suffix() + ) + if use_abi3: so_ext = get_config_var('SO') filename = filename[:-len(so_ext)] filename = filename + get_abi3_suffix() -- cgit v1.2.1 From 08511f5fdfe04a8ea6e3ae73e086e8a29a0a5cd1 Mon Sep 17 00:00:00 2001 From: stepshal Date: Sat, 20 Aug 2016 04:37:32 +0700 Subject: Fix quantity of blank lines after code object, class of function definition. --- setuptools/command/build_ext.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'setuptools/command') diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index 9caabfd5..f994b626 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -59,6 +59,7 @@ elif os.name != 'nt': if_dl = lambda s: s if have_rtld else '' + def get_abi3_suffix(): """Return the file extension for an abi3-compliant Extension()""" for suffix, _, _ in (s for s in imp.get_suffixes() if s[2] == imp.C_EXTENSION): @@ -67,6 +68,7 @@ def get_abi3_suffix(): elif suffix == '.pyd': # Windows return suffix + class build_ext(_build_ext): def run(self): -- cgit v1.2.1 From 735a66a5588aadcf02a10b58338d476803916b99 Mon Sep 17 00:00:00 2001 From: Ofekmeister Date: Sat, 20 Aug 2016 13:37:33 -0400 Subject: Make import unconditional Put import on top and updated CHANGES.rst --- setuptools/command/easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'setuptools/command') diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index e2a7dc46..5065661f 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -2018,11 +2018,11 @@ class ScriptWriter(object): template = textwrap.dedent(""" # EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r __requires__ = %(spec)r + import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': - import re sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) sys.exit( load_entry_point(%(spec)r, %(group)r, %(name)r)() -- cgit v1.2.1 From b9baa94e18e91671f9acde4e0e033be1391a7fde Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 20 Aug 2016 17:44:54 -0400 Subject: Default to gztar for sdists on all platforms. Ref #748. --- setuptools/command/sdist.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'setuptools/command') diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index b6125f58..1d4f5d54 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -66,6 +66,17 @@ class sdist(orig.sdist): if data not in dist_files: dist_files.append(data) + def initialize_options(self): + orig.sdist.initialize_options(self) + + self._default_to_gztar() + + def _default_to_gztar(self): + # only needed on Python prior to 3.6. + if sys.version_info >= (3, 6, 0, 'beta', 1): + return + self.formats = ['gztar'] + def make_distribution(self): """ Workaround for #516 -- cgit v1.2.1 From a3a7cac18c91f953957cb5fa440f203ed1f2b5fd Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 29 Aug 2016 10:28:29 +0200 Subject: easy_install: update links to documentation --- setuptools/command/easy_install.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'setuptools/command') diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 5065661f..e8b90c70 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -8,7 +8,7 @@ A tool for doing automatic download/extract/build of distutils-based Python packages. For detailed documentation, see the accompanying EasyInstall.txt file, or visit the `EasyInstall home page`__. -__ https://pythonhosted.org/setuptools/easy_install.html +__ https://setuptools.readthedocs.io/en/latest/easy_install.html """ @@ -512,7 +512,7 @@ class easy_install(Command): For information on other options, you may wish to consult the documentation at: - https://pythonhosted.org/setuptools/easy_install.html + https://setuptools.readthedocs.io/en/latest/easy_install.html Please make the appropriate changes for your system and try again. """).lstrip() @@ -1256,7 +1256,8 @@ class easy_install(Command): * You can set up the installation directory to support ".pth" files by using one of the approaches described here: - https://pythonhosted.org/setuptools/easy_install.html#custom-installation-locations + https://setuptools.readthedocs.io/en/latest/easy_install.html#custom-installation-locations + Please make the appropriate changes for your system and try again.""").lstrip() -- cgit v1.2.1 From 7f8144544f23f4fd84d339d846b91d4e3b703dd4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 1 Sep 2016 22:58:56 -0400 Subject: Provide forward compatibility for Warehouse as the default repository for the upload command. --- setuptools/command/upload_docs.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'setuptools/command') diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index ccc1c76f..269dc2d5 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -29,6 +29,10 @@ def _encode(s): class upload_docs(upload): + # override the default repository as upload_docs isn't + # supported by Warehouse (and won't be). + DEFAULT_REPOSITORY = 'https://pypi.python.org/pypi/' + description = 'Upload documentation to PyPI' user_options = [ @@ -53,6 +57,7 @@ class upload_docs(upload): self.target_dir = None def finalize_options(self): + log.warn("Upload_docs command is deprecated. Use RTD instead.") upload.finalize_options(self) if self.upload_dir is None: if self.has_sphinx(): -- cgit v1.2.1 From 00ac09a54693e77cbe791d0f8ca85db20a547e14 Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Fri, 9 Sep 2016 07:20:49 -0400 Subject: Use EXT_SUFFIX instead of SO for py_limited_api renaming --- setuptools/command/build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'setuptools/command') diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index f994b626..454c91fb 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -111,7 +111,7 @@ class build_ext(_build_ext): and get_abi3_suffix() ) if use_abi3: - so_ext = get_config_var('SO') + so_ext = get_config_var('EXT_SUFFIX') filename = filename[:-len(so_ext)] filename = filename + get_abi3_suffix() if isinstance(ext, Library): -- cgit v1.2.1 From 1f23f9a25e6c91554954185e84497056062093be Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Tue, 13 Sep 2016 10:54:45 +1200 Subject: Don't duplicate error case in package_index easy_install has code to handle parsing a requirement, catching the ValueError and then raising a DistUtilsError. This code was entirely duplicated in package_index, so I've slightly refactored to remove the duplication. --- setuptools/command/easy_install.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'setuptools/command') diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index e8b90c70..a3792ce2 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -49,8 +49,9 @@ from setuptools.sandbox import run_setup from setuptools.py31compat import get_path, get_config_vars from setuptools.command import setopt from setuptools.archive_util import unpack_archive -from setuptools.package_index import PackageIndex -from setuptools.package_index import URL_SCHEME +from setuptools.package_index import ( + PackageIndex, parse_requirement_arg, URL_SCHEME, +) from setuptools.command import bdist_egg, egg_info from pkg_resources import ( yield_lines, normalize_path, resource_string, ensure_directory, @@ -1522,15 +1523,6 @@ def get_exe_prefixes(exe_filename): return prefixes -def parse_requirement_arg(spec): - try: - return Requirement.parse(spec) - except ValueError: - raise DistutilsError( - "Not a URL, existing file, or requirement spec: %r" % (spec,) - ) - - class PthDistributions(Environment): """A .pth file with Distribution paths in it""" -- cgit v1.2.1 From 5e4eea7d600f44321e76689890f9f885669f34c9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Sep 2016 17:05:07 -0400 Subject: In test command, add installed eggs to PYTHONPATH when invoking tests so that subprocesses will also have the dependencies available. Fixes #794. --- setuptools/command/test.py | 57 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 48 insertions(+), 9 deletions(-) (limited to 'setuptools/command') diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 2d1adba8..e0650d27 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -1,10 +1,12 @@ +import os +import operator import sys import contextlib from distutils.errors import DistutilsOptionError from unittest import TestLoader from setuptools.extern import six -from setuptools.extern.six.moves import map +from setuptools.extern.six.moves import map, filter from pkg_resources import (resource_listdir, resource_exists, normalize_path, working_set, _namespace_packages, @@ -112,7 +114,7 @@ class test(Command): func() @contextlib.contextmanager - def project_on_sys_path(self): + def project_on_sys_path(self, include_dists=[]): with_2to3 = six.PY3 and getattr(self.distribution, 'use_2to3', False) if with_2to3: @@ -144,23 +146,57 @@ class test(Command): old_modules = sys.modules.copy() try: - sys.path.insert(0, normalize_path(ei_cmd.egg_base)) + project_path = normalize_path(ei_cmd.egg_base) + sys.path.insert(0, project_path) working_set.__init__() add_activation_listener(lambda dist: dist.activate()) require('%s==%s' % (ei_cmd.egg_name, ei_cmd.egg_version)) - yield + with self.paths_on_pythonpath([project_path]): + yield finally: sys.path[:] = old_path sys.modules.clear() sys.modules.update(old_modules) working_set.__init__() + @staticmethod + @contextlib.contextmanager + def paths_on_pythonpath(paths): + """ + Add the indicated paths to the head of the PYTHONPATH environment + variable so that subprocesses will also see the packages at + these paths. + + Do this in a context that restores the value on exit. + """ + nothing = object() + orig_pythonpath = os.environ.get('PYTHONPATH', nothing) + current_pythonpath = os.environ.get('PYTHONPATH', '') + try: + prefix = os.pathsep.join(paths) + to_join = filter(None, [prefix, current_pythonpath]) + new_path = os.pathsep.join(to_join) + if new_path: + os.environ['PYTHONPATH'] = new_path + yield + finally: + if orig_pythonpath is nothing: + os.environ.pop('PYTHONPATH', None) + else: + os.environ['PYTHONPATH'] = orig_pythonpath + def run(self): + installed_dists = [] if self.distribution.install_requires: - self.distribution.fetch_build_eggs( - self.distribution.install_requires) + installed_dists.extend( + self.distribution.fetch_build_eggs( + self.distribution.install_requires, + )) if self.distribution.tests_require: - self.distribution.fetch_build_eggs(self.distribution.tests_require) + installed_dists.extend( + self.distribution.fetch_build_eggs( + self.distribution.tests_require, + )) cmd = ' '.join(self._argv) if self.dry_run: @@ -168,8 +204,11 @@ class test(Command): return self.announce('running "%s"' % cmd) - with self.project_on_sys_path(): - self.run_tests() + + paths = map(operator.attrgetter('location'), installed_dists) + with self.paths_on_pythonpath(paths): + with self.project_on_sys_path(): + self.run_tests() def run_tests(self): # Purge modules under test from sys.modules. The test loader will -- cgit v1.2.1 From 2f3b7b204187a1c93c391ffac96a9220cbb57f91 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Sep 2016 09:20:17 -0400 Subject: Extract test.install_dists and distill it with a variable extraction and fallback variables. --- setuptools/command/test.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'setuptools/command') diff --git a/setuptools/command/test.py b/setuptools/command/test.py index e0650d27..48d5b5e1 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -2,6 +2,7 @@ import os import operator import sys import contextlib +import itertools from distutils.errors import DistutilsOptionError from unittest import TestLoader @@ -185,18 +186,18 @@ class test(Command): else: os.environ['PYTHONPATH'] = orig_pythonpath + def install_dists(self): + """ + Install the requirements indicated by self.distribution and + return an iterable of the dists that were built. + """ + dist = self.distribution + ir_d = dist.fetch_build_eggs(dist.install_requires or []) + tr_d = dist.fetch_build_eggs(dist.tests_require or []) + return itertools.chain(ir_d, tr_d) + def run(self): - installed_dists = [] - if self.distribution.install_requires: - installed_dists.extend( - self.distribution.fetch_build_eggs( - self.distribution.install_requires, - )) - if self.distribution.tests_require: - installed_dists.extend( - self.distribution.fetch_build_eggs( - self.distribution.tests_require, - )) + installed_dists = self.install_dists() cmd = ' '.join(self._argv) if self.dry_run: -- cgit v1.2.1 From 2148592395ef4da0d408be26bf5839117ee0e5fe Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Sep 2016 09:27:23 -0400 Subject: Even better, use a static method --- setuptools/command/test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'setuptools/command') diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 48d5b5e1..38bbcd8b 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -186,18 +186,18 @@ class test(Command): else: os.environ['PYTHONPATH'] = orig_pythonpath - def install_dists(self): + @staticmethod + def install_dists(dist): """ Install the requirements indicated by self.distribution and return an iterable of the dists that were built. """ - dist = self.distribution ir_d = dist.fetch_build_eggs(dist.install_requires or []) tr_d = dist.fetch_build_eggs(dist.tests_require or []) return itertools.chain(ir_d, tr_d) def run(self): - installed_dists = self.install_dists() + installed_dists = self.install_dists(self.distribution) cmd = ' '.join(self._argv) if self.dry_run: -- cgit v1.2.1