From 8423e1ed14ac1691c2863c6e8cac9230cf558d7b Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Fri, 19 Mar 2004 20:53:14 +0000 Subject: Initial checkin of setuptools 0.0.1. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4040869 --- setuptools/command/install.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 setuptools/command/install.py (limited to 'setuptools/command/install.py') diff --git a/setuptools/command/install.py b/setuptools/command/install.py new file mode 100644 index 00000000..82e7ebe8 --- /dev/null +++ b/setuptools/command/install.py @@ -0,0 +1,11 @@ +from distutils.command.install import install as _install + +class install(_install): + """Build dependencies before installation""" + + def has_dependencies(self): + return self.distribution.has_dependencies() + + sub_commands = [('depends',has_dependencies)] + _install.sub_commands + + -- cgit v1.2.1 From 1c904e7a58dab0f911cc654979a4e3c4f94f119b Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Mon, 5 Apr 2004 20:02:45 +0000 Subject: - remove trailing blank lines - use whitespace according to the Python style guide --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4040895 --- setuptools/command/install.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'setuptools/command/install.py') diff --git a/setuptools/command/install.py b/setuptools/command/install.py index 82e7ebe8..86f0cb7b 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -6,6 +6,4 @@ class install(_install): def has_dependencies(self): return self.distribution.has_dependencies() - sub_commands = [('depends',has_dependencies)] + _install.sub_commands - - + sub_commands = [('depends', has_dependencies)] + _install.sub_commands -- cgit v1.2.1 From 8afe820f59c3b63795bd235f2800b0e1329eb7e1 Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Sat, 6 Aug 2005 19:29:49 +0000 Subject: Got rid of the no-longer meaningful "depends" command. Consolidated the replacement of the "install" command so that installation is always via easy_install, but doesn't use the previous kludgy intereception technique. Allow ``extra_path`` to be set, but ignore it, so that when easy_install wraps a package that uses it, there won't be any confusion as to the desired installation location. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041181 --- setuptools/command/install.py | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'setuptools/command/install.py') diff --git a/setuptools/command/install.py b/setuptools/command/install.py index 86f0cb7b..acbe8ade 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -1,9 +1,31 @@ +import setuptools from distutils.command.install import install as _install class install(_install): """Build dependencies before installation""" - def has_dependencies(self): - return self.distribution.has_dependencies() + def handle_extra_path(self): + # We always ignore extra_path, because we always install eggs + # (you can always use install_* commands directly if needed) + self.path_file = None + self.extra_dirs = '' + + def run(self): + from setuptools.command.easy_install import easy_install + cmd = easy_install( + self.distribution, args="x", ignore_conflicts_at_my_risk=1 + ) + cmd.ensure_finalized() # finalize before bdist_egg munges install cmd + + self.run_command('bdist_egg') + args = [self.distribution.get_command_obj('bdist_egg').egg_output] + + if setuptools.bootstrap_install_from: + # Bootstrap self-installation of setuptools + args.insert(0, setuptools.bootstrap_install_from) + + cmd.args = args + cmd.run() + setuptools.bootstrap_install_from = None + - sub_commands = [('depends', has_dependencies)] + _install.sub_commands -- cgit v1.2.1 From b8878fdb9dc2bfe8733a852547f15ec167476752 Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Thu, 11 Aug 2005 14:58:54 +0000 Subject: Fixed breakage of bdist_* commands that call the 'install' command. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041190 --- setuptools/command/install.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'setuptools/command/install.py') diff --git a/setuptools/command/install.py b/setuptools/command/install.py index acbe8ade..f438dda6 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -1,8 +1,8 @@ -import setuptools +import setuptools, sys from distutils.command.install import install as _install class install(_install): - """Build dependencies before installation""" + """Use easy_install to install the package, w/dependencies""" def handle_extra_path(self): # We always ignore extra_path, because we always install eggs @@ -11,6 +11,16 @@ class install(_install): self.extra_dirs = '' def run(self): + calling_module = sys._getframe(1).f_globals.get('__name__','') + if calling_module != 'distutils.dist': + # We're not being run from the command line, so use old-style + # behavior. This is a bit kludgy, because a command might use + # dist.run_command() to run 'install', but bdist_dumb and + # bdist_wininst both call run directly at the moment. + # When this is part of the distutils, the old install behavior + # should probably be requested with a flag, or a different method. + return _install.run(self) + from setuptools.command.easy_install import easy_install cmd = easy_install( self.distribution, args="x", ignore_conflicts_at_my_risk=1 @@ -28,4 +38,3 @@ class install(_install): cmd.run() setuptools.bootstrap_install_from = None - -- cgit v1.2.1 From b577c94170b64436919bea8e002c64623d0a9644 Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Mon, 22 Aug 2005 13:40:10 +0000 Subject: Make easy_install --record strip the RPM root when building RPMs, and have bdist_egg ignore the RPM root when building an egg. This version now can actually run bdist_rpm to completion, although the resulting RPM will install an egg without a corresponding .pth file. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041226 --- setuptools/command/install.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'setuptools/command/install.py') diff --git a/setuptools/command/install.py b/setuptools/command/install.py index f438dda6..c555e7e0 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -23,7 +23,8 @@ class install(_install): from setuptools.command.easy_install import easy_install cmd = easy_install( - self.distribution, args="x", ignore_conflicts_at_my_risk=1 + self.distribution, args="x", ignore_conflicts_at_my_risk=1, + root=self.root ) cmd.ensure_finalized() # finalize before bdist_egg munges install cmd -- cgit v1.2.1 From 78e2272d52969e26af767e0cbfadeaefebe84657 Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Sat, 3 Sep 2005 04:51:27 +0000 Subject: Added support for old-style RPMs (i.e. non-egg RPMs) --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041238 --- setuptools/command/install.py | 57 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 49 insertions(+), 8 deletions(-) (limited to 'setuptools/command/install.py') diff --git a/setuptools/command/install.py b/setuptools/command/install.py index c555e7e0..78d32bef 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -4,6 +4,16 @@ from distutils.command.install import install as _install class install(_install): """Use easy_install to install the package, w/dependencies""" + user_options = _install.user_options + [ + ('old-and-unmanageable', None, "Try not to use this!"), + ] + + boolean_options = _install.boolean_options + ['old-and-unmanageable'] + + def initialize_options(self): + _install.initialize_options(self) + self.old_and_unmanageable = None + def handle_extra_path(self): # We always ignore extra_path, because we always install eggs # (you can always use install_* commands directly if needed) @@ -11,23 +21,24 @@ class install(_install): self.extra_dirs = '' def run(self): - calling_module = sys._getframe(1).f_globals.get('__name__','') - if calling_module != 'distutils.dist': - # We're not being run from the command line, so use old-style - # behavior. This is a bit kludgy, because a command might use - # dist.run_command() to run 'install', but bdist_dumb and - # bdist_wininst both call run directly at the moment. - # When this is part of the distutils, the old install behavior - # should probably be requested with a flag, or a different method. + if (self.old_and_unmanageable or + sys._getframe(1).f_globals.get('__name__','') != 'distutils.dist' + ): + # Either we were asked for the old behavior, or we're not being + # run from the command line. This is a bit kludgy, because a + # command might use dist.run_command() to run 'install', but + # bdist_dumb and bdist_wininst both call run() directly right now. return _install.run(self) from setuptools.command.easy_install import easy_install + cmd = easy_install( self.distribution, args="x", ignore_conflicts_at_my_risk=1, root=self.root ) cmd.ensure_finalized() # finalize before bdist_egg munges install cmd + self.run_command('bdist_egg') args = [self.distribution.get_command_obj('bdist_egg').egg_output] @@ -39,3 +50,33 @@ class install(_install): cmd.run() setuptools.bootstrap_install_from = None + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.1 From d092afc47ef99d19ab6f1dbb8b3b14c50edf3eb7 Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Fri, 4 Nov 2005 03:06:52 +0000 Subject: Workaround for broken DISTUTILS_DEBUG output. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041393 --- setuptools/command/install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'setuptools/command/install.py') diff --git a/setuptools/command/install.py b/setuptools/command/install.py index 78d32bef..6a34ab54 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -13,6 +13,7 @@ class install(_install): def initialize_options(self): _install.initialize_options(self) self.old_and_unmanageable = None + self.no_compile = None # make DISTUTILS_DEBUG work right! def handle_extra_path(self): # We always ignore extra_path, because we always install eggs @@ -38,7 +39,6 @@ class install(_install): ) cmd.ensure_finalized() # finalize before bdist_egg munges install cmd - self.run_command('bdist_egg') args = [self.distribution.get_command_obj('bdist_egg').egg_output] -- cgit v1.2.1 From c7eeb6273fd7593d7bccfbe41f44b5aa2ab17c1d Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Wed, 14 Dec 2005 17:37:30 +0000 Subject: Added an internal ``install_egg_info`` command to use as part of old-style ``install`` operations, that installs an ``.egg-info`` directory with the package. This is a preliminary step to implementing "install --single-version-externally-managed" for use with bdist_* commands and Debian. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041670 --- setuptools/command/install.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'setuptools/command/install.py') diff --git a/setuptools/command/install.py b/setuptools/command/install.py index 6a34ab54..51d4ffe0 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -50,9 +50,9 @@ class install(_install): cmd.run() setuptools.bootstrap_install_from = None - - - + sub_commands = _install.sub_commands + [ + ('install_egg_info', lambda self: True), + ] -- cgit v1.2.1 From 66d77b786bd16b4f186c37951f18edfc1c8dec00 Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Wed, 14 Dec 2005 18:10:11 +0000 Subject: Added a ``--single-version-externally-managed`` option to the ``install`` command so that you can more easily wrap a "flat" egg in a system package. Enhanced ``bdist_rpm`` so that it installs single-version eggs that don't rely on a ``.pth`` file. The ``--no-egg`` option has been removed, since all RPMs are now built in a more backwards-compatible format. Some work is now needed for easy_install to recognize bdist_wininst .exe's that wrap these new flat eggs, as currently the .egg-info will not be recognized. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041673 --- setuptools/command/install.py | 46 +++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'setuptools/command/install.py') diff --git a/setuptools/command/install.py b/setuptools/command/install.py index 51d4ffe0..77b97b67 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -1,29 +1,47 @@ import setuptools, sys from distutils.command.install import install as _install +from distutils.errors import DistutilsArgError class install(_install): """Use easy_install to install the package, w/dependencies""" user_options = _install.user_options + [ ('old-and-unmanageable', None, "Try not to use this!"), + ('single-version-externally-managed', None, + "used by system package builders to create 'flat' eggs"), ] - boolean_options = _install.boolean_options + ['old-and-unmanageable'] + boolean_options = _install.boolean_options + [ + 'old-and-unmanageable', 'single-version-externally-managed', + ] + + sub_commands = _install.sub_commands + [ + ('install_egg_info', lambda self: True), + ] def initialize_options(self): _install.initialize_options(self) self.old_and_unmanageable = None + self.single_version_externally_managed = None self.no_compile = None # make DISTUTILS_DEBUG work right! + def finalize_options(self): + _install.initialize_options(self) + if self.single_version_externally_managed: + if not self.root and not self.record: + raise DistutilsArgError( + "You must specify --record or --root when building system" + " packages" + ) + def handle_extra_path(self): - # We always ignore extra_path, because we always install eggs - # (you can always use install_* commands directly if needed) + # We always ignore extra_path, because we install as .egg or .egg-info self.path_file = None self.extra_dirs = '' def run(self): - if (self.old_and_unmanageable or - sys._getframe(1).f_globals.get('__name__','') != 'distutils.dist' + if (self.old_and_unmanageable or self.single_version_externally_managed + or sys._getframe(1).f_globals.get('__name__','') != 'distutils.dist' ): # Either we were asked for the old behavior, or we're not being # run from the command line. This is a bit kludgy, because a @@ -50,24 +68,6 @@ class install(_install): cmd.run() setuptools.bootstrap_install_from = None - sub_commands = _install.sub_commands + [ - ('install_egg_info', lambda self: True), - ] - - - - - - - - - - - - - - - -- cgit v1.2.1 From 13e9b3d6cbdc9c7a8bda76a7d7029e790c02507b Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Wed, 14 Dec 2005 18:26:28 +0000 Subject: Oops. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041675 --- setuptools/command/install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'setuptools/command/install.py') diff --git a/setuptools/command/install.py b/setuptools/command/install.py index 77b97b67..2cc0cb84 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -26,7 +26,7 @@ class install(_install): self.no_compile = None # make DISTUTILS_DEBUG work right! def finalize_options(self): - _install.initialize_options(self) + _install.finalize_options(self) if self.single_version_externally_managed: if not self.root and not self.record: raise DistutilsArgError( -- cgit v1.2.1 From 1b77dd8e7845b5ac38fc7367796290dd65b8c531 Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Wed, 14 Dec 2005 23:47:22 +0000 Subject: Support full roundtrip translation of eggs to and from ``bdist_wininst`` format. Running ``bdist_wininst`` on a setuptools-based package wraps the egg in an .exe that will safely install it as an egg (i.e., with metadata and entry-point wrapper scripts), and ``easy_install`` can turn the .exe back into an ``.egg`` file or directory and install it as such. At this point, it should also be possible to "system package" any egg, complete with wrapper scripts, and at least bdist_wininst works now. More testing is needed for at least bdist_dumb and bdist_rpm. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041692 --- setuptools/command/install.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'setuptools/command/install.py') diff --git a/setuptools/command/install.py b/setuptools/command/install.py index 2cc0cb84..760a416c 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -15,8 +15,11 @@ class install(_install): 'old-and-unmanageable', 'single-version-externally-managed', ] - sub_commands = _install.sub_commands + [ + sub_commands = [ + cmd for cmd in _install.sub_commands if cmd[0] != 'install_scripts' + ] + [ ('install_egg_info', lambda self: True), + ('install_scripts', lambda self: True), ] def initialize_options(self): @@ -53,7 +56,7 @@ class install(_install): cmd = easy_install( self.distribution, args="x", ignore_conflicts_at_my_risk=1, - root=self.root + root=self.root, record=self.record, ) cmd.ensure_finalized() # finalize before bdist_egg munges install cmd -- cgit v1.2.1 From 646a5b9410d36f9c2ecfb93998d2983f6f33d5d5 Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Fri, 16 Dec 2005 19:37:21 +0000 Subject: Fix bdist_dumb support to use .egg-info instead of .egg format. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041716 --- setuptools/command/install.py | 52 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 45 insertions(+), 7 deletions(-) (limited to 'setuptools/command/install.py') diff --git a/setuptools/command/install.py b/setuptools/command/install.py index 760a416c..55321256 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -37,21 +37,51 @@ class install(_install): " packages" ) + + def handle_extra_path(self): # We always ignore extra_path, because we install as .egg or .egg-info self.path_file = None self.extra_dirs = '' def run(self): - if (self.old_and_unmanageable or self.single_version_externally_managed - or sys._getframe(1).f_globals.get('__name__','') != 'distutils.dist' - ): - # Either we were asked for the old behavior, or we're not being - # run from the command line. This is a bit kludgy, because a - # command might use dist.run_command() to run 'install', but - # bdist_dumb and bdist_wininst both call run() directly right now. + # Explicit request for old-style install? Just do it + if self.old_and_unmanageable or self.single_version_externally_managed: return _install.run(self) + # Attempt to detect whether we were called from setup() or by another + # command. If we were called by setup(), our caller will be the + # 'run_command' method in 'distutils.dist', and *its* caller will be + # the 'run_commands' method. If we were called any other way, our + # immediate caller *might* be 'run_command', but it won't have been + # called by 'run_commands'. This is slightly kludgy, but seems to + # work. + # + caller = sys._getframe(2) + caller_module = caller.f_globals.get('__name__','') + caller_name = caller.f_code.co_name + + if caller_module != 'distutils.dist' or caller_name!='run_commands': + # We weren't called from the command line or setup(), so we + # should run in backward-compatibility mode to support bdist_* + # commands. + _install.run(self) + else: + self.do_egg_install() + + + + + + + + + + + + + def do_egg_install(self): + from setuptools.command.easy_install import easy_install cmd = easy_install( @@ -82,4 +112,12 @@ class install(_install): + + + + + + + + -- cgit v1.2.1 From 087c9f1eb3e1b64b0d9cdb43d0946dd54d6885e5 Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Sat, 4 Mar 2006 00:00:20 +0000 Subject: Made ``--single-version-externally-managed`` automatic when ``--root`` is used, so that most system packagers won't require special support for setuptools. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4042823 --- setuptools/command/install.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'setuptools/command/install.py') diff --git a/setuptools/command/install.py b/setuptools/command/install.py index 55321256..d8da70c9 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -30,15 +30,15 @@ class install(_install): def finalize_options(self): _install.finalize_options(self) - if self.single_version_externally_managed: + if self.root: + self.single_version_externally_managed = True + elif self.single_version_externally_managed: if not self.root and not self.record: raise DistutilsArgError( "You must specify --record or --root when building system" " packages" ) - - def handle_extra_path(self): # We always ignore extra_path, because we install as .egg or .egg-info self.path_file = None -- cgit v1.2.1 From 874bb1e0edb998be14cc504a3186be2636099d8e Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Fri, 24 Mar 2006 17:48:17 +0000 Subject: Remove use of obsolete --ignore-conflicts-at-my-risk option --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4043296 --- setuptools/command/install.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'setuptools/command/install.py') diff --git a/setuptools/command/install.py b/setuptools/command/install.py index d8da70c9..664614ac 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -85,8 +85,7 @@ class install(_install): from setuptools.command.easy_install import easy_install cmd = easy_install( - self.distribution, args="x", ignore_conflicts_at_my_risk=1, - root=self.root, record=self.record, + self.distribution, args="x", root=self.root, record=self.record, ) cmd.ensure_finalized() # finalize before bdist_egg munges install cmd @@ -119,5 +118,6 @@ class install(_install): + -- cgit v1.2.1 From c1294e1d0218322a1e3457897198837a071f2271 Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Tue, 28 Mar 2006 19:07:52 +0000 Subject: Support Python 2.5, which now includes its own install_egg_info command. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4043406 --- setuptools/command/install.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'setuptools/command/install.py') diff --git a/setuptools/command/install.py b/setuptools/command/install.py index 664614ac..7221b171 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -10,17 +10,17 @@ class install(_install): ('single-version-externally-managed', None, "used by system package builders to create 'flat' eggs"), ] - boolean_options = _install.boolean_options + [ 'old-and-unmanageable', 'single-version-externally-managed', ] - - sub_commands = [ - cmd for cmd in _install.sub_commands if cmd[0] != 'install_scripts' - ] + [ + new_commands = [ ('install_egg_info', lambda self: True), ('install_scripts', lambda self: True), ] + _nc = dict(new_commands) + sub_commands = [ + cmd for cmd in _install.sub_commands if cmd[0] not in _nc + ] + new_commands def initialize_options(self): _install.initialize_options(self) -- cgit v1.2.1 From 5afddb363fe7156d26d7faf0c3cc51e7a4c14fc6 Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Tue, 18 Jul 2006 16:03:45 +0000 Subject: Support ``extra_path`` option to ``setup()`` when ``install`` is run in backward-compatibility mode. (backport from trunk) --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4050700 --- setuptools/command/install.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'setuptools/command/install.py') diff --git a/setuptools/command/install.py b/setuptools/command/install.py index 7221b171..b9ceea9c 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -40,10 +40,16 @@ class install(_install): ) def handle_extra_path(self): - # We always ignore extra_path, because we install as .egg or .egg-info + if self.root or self.single_version_externally_managed: + # explicit backward-compatibility mode, allow extra_path to work + return _install.handle_extra_path(self) + + # Ignore extra_path when installing an egg (or being run by another + # command without --root or --single-version-externally-managed self.path_file = None self.extra_dirs = '' + def run(self): # Explicit request for old-style install? Just do it if self.old_and_unmanageable or self.single_version_externally_managed: @@ -60,7 +66,7 @@ class install(_install): caller = sys._getframe(2) caller_module = caller.f_globals.get('__name__','') caller_name = caller.f_code.co_name - + if caller_module != 'distutils.dist' or caller_name!='run_commands': # We weren't called from the command line or setup(), so we # should run in backward-compatibility mode to support bdist_* @@ -68,12 +74,6 @@ class install(_install): _install.run(self) else: self.do_egg_install() - - - - - - @@ -120,4 +120,4 @@ class install(_install): - +# -- cgit v1.2.1 From 877544db61f93a08d37b6dfba2cc7f54b15835a9 Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Tue, 20 Feb 2007 22:50:42 +0000 Subject: Respect possible entry point override of 'easy_install' command. (backport from trunk) --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4053835 --- setuptools/command/install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'setuptools/command/install.py') diff --git a/setuptools/command/install.py b/setuptools/command/install.py index b9ceea9c..1de38aba 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -82,7 +82,7 @@ class install(_install): def do_egg_install(self): - from setuptools.command.easy_install import easy_install + easy_install = self.distribution.get_command_class('easy_install') cmd = easy_install( self.distribution, args="x", root=self.root, record=self.record, -- cgit v1.2.1 From 60cf2d31c8edb39b418f522ad935320c6da9c927 Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Sat, 19 Jan 2008 02:55:03 +0000 Subject: Fix interactions between the various "require" options, so that downloads aren't repeated and needed eggs are always installed, even if they were downloaded to the setup directory already. (backport from trunk) --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4060066 --- setuptools/command/install.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'setuptools/command/install.py') diff --git a/setuptools/command/install.py b/setuptools/command/install.py index 1de38aba..a150c435 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -1,4 +1,4 @@ -import setuptools, sys +import setuptools, sys, glob from distutils.command.install import install as _install from distutils.errors import DistutilsArgError @@ -88,6 +88,10 @@ class install(_install): self.distribution, args="x", root=self.root, record=self.record, ) cmd.ensure_finalized() # finalize before bdist_egg munges install cmd + cmd.always_copy_from = '.' # make sure local-dir eggs get installed + + # pick up setup-dir .egg files only: no .egg-info + cmd.package_index.scan(glob.glob('*.egg')) self.run_command('bdist_egg') args = [self.distribution.get_command_obj('bdist_egg').egg_output] @@ -115,9 +119,5 @@ class install(_install): - - - - # -- cgit v1.2.1 From c8fafe39c39a6814741b3f2825320c565c02058c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Fri, 11 Sep 2009 23:48:25 +0200 Subject: Work around apparent 3.x limitation wrt. variables in list comprehensions. --HG-- branch : distribute extra : rebase_source : 214eb64288ef1955fd06ba1cf594b6a780cccde8 --- setuptools/command/install.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'setuptools/command/install.py') diff --git a/setuptools/command/install.py b/setuptools/command/install.py index a150c435..247c4f25 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -18,9 +18,6 @@ class install(_install): ('install_scripts', lambda self: True), ] _nc = dict(new_commands) - sub_commands = [ - cmd for cmd in _install.sub_commands if cmd[0] not in _nc - ] + new_commands def initialize_options(self): _install.initialize_options(self) @@ -104,6 +101,10 @@ class install(_install): cmd.run() setuptools.bootstrap_install_from = None +# XXX Python 3.1 doesn't see _nc if this is inside the class +install.sub_commands = [ + cmd for cmd in _install.sub_commands if cmd[0] not in install._nc + ] + install.new_commands -- cgit v1.2.1 From e81800c109d87617f2c82a4f53a565f9c26e0614 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 6 Jan 2014 10:21:11 -0500 Subject: Remove excess whitespace --HG-- extra : rebase_source : 4d1b9f2354d8966b2bd8c375662e5f29817adbb3 --- setuptools/command/install.py | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) (limited to 'setuptools/command/install.py') diff --git a/setuptools/command/install.py b/setuptools/command/install.py index 247c4f25..459cd3cd 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -1,4 +1,6 @@ -import setuptools, sys, glob +import setuptools +import sys +import glob from distutils.command.install import install as _install from distutils.errors import DistutilsArgError @@ -15,7 +17,7 @@ class install(_install): ] new_commands = [ ('install_egg_info', lambda self: True), - ('install_scripts', lambda self: True), + ('install_scripts', lambda self: True), ] _nc = dict(new_commands) @@ -46,7 +48,6 @@ class install(_install): self.path_file = None self.extra_dirs = '' - def run(self): # Explicit request for old-style install? Just do it if self.old_and_unmanageable or self.single_version_externally_managed: @@ -72,11 +73,6 @@ class install(_install): else: self.do_egg_install() - - - - - def do_egg_install(self): easy_install = self.distribution.get_command_class('easy_install') @@ -105,20 +101,3 @@ class install(_install): install.sub_commands = [ cmd for cmd in _install.sub_commands if cmd[0] not in install._nc ] + install.new_commands - - - - - - - - - - - - - - - - -# -- cgit v1.2.1 From e72e8676e8b9eec8e39c14258c145b8e2e120769 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 13 Mar 2014 23:11:19 -0400 Subject: Remove special handling of 'no_compile' option with comment about making DISTUTILS_DEBUG work right. While testing on Python 2.6 and later, I was unable to evoke any abberant or distinct behavior by removing the value (with DISTUTILS_DEBUG enabled and using variations of --compile and --no-compile). Therefore, I believe that whatever was the motivation for adding the attribute (in 2c91c12dc9b1), its purpose has passed. --- setuptools/command/install.py | 1 - 1 file changed, 1 deletion(-) (limited to 'setuptools/command/install.py') diff --git a/setuptools/command/install.py b/setuptools/command/install.py index 459cd3cd..784e8efd 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -25,7 +25,6 @@ class install(_install): _install.initialize_options(self) self.old_and_unmanageable = None self.single_version_externally_managed = None - self.no_compile = None # make DISTUTILS_DEBUG work right! def finalize_options(self): _install.finalize_options(self) -- cgit v1.2.1 From 0b80f934c1e2effcc2484ae644613ad9beedf02f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Mar 2014 12:41:43 +0100 Subject: Extract a method to capture the intention of caller detection. --- setuptools/command/install.py | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) (limited to 'setuptools/command/install.py') diff --git a/setuptools/command/install.py b/setuptools/command/install.py index 784e8efd..c3f1ff92 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -52,19 +52,8 @@ class install(_install): if self.old_and_unmanageable or self.single_version_externally_managed: return _install.run(self) - # Attempt to detect whether we were called from setup() or by another - # command. If we were called by setup(), our caller will be the - # 'run_command' method in 'distutils.dist', and *its* caller will be - # the 'run_commands' method. If we were called any other way, our - # immediate caller *might* be 'run_command', but it won't have been - # called by 'run_commands'. This is slightly kludgy, but seems to - # work. - # - caller = sys._getframe(2) - caller_module = caller.f_globals.get('__name__','') - caller_name = caller.f_code.co_name - - if caller_module != 'distutils.dist' or caller_name!='run_commands': + called_from_setup = self._called_from_setup(sys._getframe(2)) + if not called_from_setup: # We weren't called from the command line or setup(), so we # should run in backward-compatibility mode to support bdist_* # commands. @@ -72,6 +61,25 @@ class install(_install): else: self.do_egg_install() + @staticmethod + def _called_from_setup(run_parent_parent): + """ + Attempt to detect whether we were called from setup() or by another + command. If we were called by setup(), our caller will be the + 'run_command' method in 'distutils.dist', and *its* caller will be + the 'run_commands' method. If we were called any other way, our + immediate caller *might* be 'run_command', but it won't have been + called by 'run_commands'. This is slightly kludgy, but seems to + work. + """ + caller = run_parent_parent + caller_module = caller.f_globals.get('__name__','') + caller_name = caller.f_code.co_name + return ( + caller_module == 'distutils.dist' + and caller_name == 'run_commands' + ) + def do_egg_install(self): easy_install = self.distribution.get_command_class('easy_install') -- cgit v1.2.1 From 215a0cddf02d70e9b92b27b5b7997314b6527426 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Mar 2014 12:59:37 +0100 Subject: Use inspect module instead of _getframe --- setuptools/command/install.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'setuptools/command/install.py') diff --git a/setuptools/command/install.py b/setuptools/command/install.py index c3f1ff92..1d7810b8 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -1,5 +1,5 @@ import setuptools -import sys +import inspect import glob from distutils.command.install import install as _install from distutils.errors import DistutilsArgError @@ -52,7 +52,7 @@ class install(_install): if self.old_and_unmanageable or self.single_version_externally_managed: return _install.run(self) - called_from_setup = self._called_from_setup(sys._getframe(2)) + called_from_setup = self._called_from_setup(inspect.currentframe()) if not called_from_setup: # We weren't called from the command line or setup(), so we # should run in backward-compatibility mode to support bdist_* @@ -62,7 +62,7 @@ class install(_install): self.do_egg_install() @staticmethod - def _called_from_setup(run_parent_parent): + def _called_from_setup(run_frame): """ Attempt to detect whether we were called from setup() or by another command. If we were called by setup(), our caller will be the @@ -72,12 +72,13 @@ class install(_install): called by 'run_commands'. This is slightly kludgy, but seems to work. """ - caller = run_parent_parent - caller_module = caller.f_globals.get('__name__','') - caller_name = caller.f_code.co_name + res = inspect.getouterframes(run_frame)[2] + caller, = res[:1] + info = inspect.getframeinfo(caller) + caller_module = caller.f_globals.get('__name__', '') return ( caller_module == 'distutils.dist' - and caller_name == 'run_commands' + and info.function == 'run_commands' ) def do_egg_install(self): -- cgit v1.2.1 From be01e5c951fb85be934cf66a4d7878faebbb6cda Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Mar 2014 13:02:50 +0100 Subject: Update docstring --- setuptools/command/install.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'setuptools/command/install.py') diff --git a/setuptools/command/install.py b/setuptools/command/install.py index 1d7810b8..3e6ba427 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -64,13 +64,12 @@ class install(_install): @staticmethod def _called_from_setup(run_frame): """ - Attempt to detect whether we were called from setup() or by another - command. If we were called by setup(), our caller will be the + Attempt to detect whether run() was called from setup() or by another + command. If called by setup(), the parent caller will be the 'run_command' method in 'distutils.dist', and *its* caller will be - the 'run_commands' method. If we were called any other way, our + the 'run_commands' method. If called any other way, the immediate caller *might* be 'run_command', but it won't have been - called by 'run_commands'. This is slightly kludgy, but seems to - work. + called by 'run_commands'. Return True in that case or False otherwise. """ res = inspect.getouterframes(run_frame)[2] caller, = res[:1] -- cgit v1.2.1 From 421bad961106fd8353980708487b4fdfff802731 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Mar 2014 13:04:17 +0100 Subject: Simplify comment not to repeat the obvious implication of the 'if' test. --HG-- extra : amend_source : c92063405d99e7fdb7fe0a6312fa8438c3727c2f --- setuptools/command/install.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'setuptools/command/install.py') diff --git a/setuptools/command/install.py b/setuptools/command/install.py index 3e6ba427..05a25c26 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -54,9 +54,7 @@ class install(_install): called_from_setup = self._called_from_setup(inspect.currentframe()) if not called_from_setup: - # We weren't called from the command line or setup(), so we - # should run in backward-compatibility mode to support bdist_* - # commands. + # Run in backward-compatibility mode to support bdist_* commands. _install.run(self) else: self.do_egg_install() -- cgit v1.2.1 From 359dcd429be8857202ebcfa5b85686b032414759 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Mar 2014 13:04:49 +0100 Subject: variable name is superfluous now --- setuptools/command/install.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'setuptools/command/install.py') diff --git a/setuptools/command/install.py b/setuptools/command/install.py index 05a25c26..f52423f4 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -52,8 +52,7 @@ class install(_install): if self.old_and_unmanageable or self.single_version_externally_managed: return _install.run(self) - called_from_setup = self._called_from_setup(inspect.currentframe()) - if not called_from_setup: + if not self._called_from_setup(inspect.currentframe()): # Run in backward-compatibility mode to support bdist_* commands. _install.run(self) else: -- cgit v1.2.1 From 292f0a6f46fd43144ccbe43512bc3eb4ff01dd9d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Mar 2014 13:28:18 +0100 Subject: Allow install to proceed with an egg install on IronPython and any other environment that has no stack support. Fixes #177. --- setuptools/command/install.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'setuptools/command/install.py') diff --git a/setuptools/command/install.py b/setuptools/command/install.py index f52423f4..1681617f 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -1,6 +1,8 @@ import setuptools import inspect import glob +import warnings +import platform from distutils.command.install import install as _install from distutils.errors import DistutilsArgError @@ -66,8 +68,16 @@ class install(_install): 'run_command' method in 'distutils.dist', and *its* caller will be the 'run_commands' method. If called any other way, the immediate caller *might* be 'run_command', but it won't have been - called by 'run_commands'. Return True in that case or False otherwise. + called by 'run_commands'. Return True in that case or if a call stack + is unavailable. Return False otherwise. """ + if run_frame is None: + msg = "Call stack not available. bdist_* commands may fail." + warnings.warn(msg) + if platform.python_implementation() == 'IronPython': + msg = "For best results, pass -X:Frames to enable call stack." + warnings.warn(msg) + return True res = inspect.getouterframes(run_frame)[2] caller, = res[:1] info = inspect.getframeinfo(caller) -- cgit v1.2.1 From 573c2c86d4d4f506a87a1fc16060f32c1386ad38 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 30 Apr 2014 17:38:29 -0400 Subject: Correct indentation and clarify meaning by using namespacing --HG-- extra : amend_source : 20ab7547c8478eb084767fe701e627bdd462ba16 --- setuptools/command/install.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'setuptools/command/install.py') diff --git a/setuptools/command/install.py b/setuptools/command/install.py index 1681617f..3425dbf7 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -3,18 +3,18 @@ import inspect import glob import warnings import platform -from distutils.command.install import install as _install +import distutils.command.install as orig from distutils.errors import DistutilsArgError -class install(_install): +class install(orig.install): """Use easy_install to install the package, w/dependencies""" - user_options = _install.user_options + [ + user_options = orig.install.user_options + [ ('old-and-unmanageable', None, "Try not to use this!"), ('single-version-externally-managed', None, "used by system package builders to create 'flat' eggs"), ] - boolean_options = _install.boolean_options + [ + boolean_options = orig.install.boolean_options + [ 'old-and-unmanageable', 'single-version-externally-managed', ] new_commands = [ @@ -24,12 +24,12 @@ class install(_install): _nc = dict(new_commands) def initialize_options(self): - _install.initialize_options(self) + orig.install.initialize_options(self) self.old_and_unmanageable = None self.single_version_externally_managed = None def finalize_options(self): - _install.finalize_options(self) + orig.install.finalize_options(self) if self.root: self.single_version_externally_managed = True elif self.single_version_externally_managed: @@ -42,7 +42,7 @@ class install(_install): def handle_extra_path(self): if self.root or self.single_version_externally_managed: # explicit backward-compatibility mode, allow extra_path to work - return _install.handle_extra_path(self) + return orig.install.handle_extra_path(self) # Ignore extra_path when installing an egg (or being run by another # command without --root or --single-version-externally-managed @@ -52,11 +52,11 @@ class install(_install): def run(self): # Explicit request for old-style install? Just do it if self.old_and_unmanageable or self.single_version_externally_managed: - return _install.run(self) + return orig.install.run(self) if not self._called_from_setup(inspect.currentframe()): # Run in backward-compatibility mode to support bdist_* commands. - _install.run(self) + orig.install.run(self) else: self.do_egg_install() @@ -113,5 +113,5 @@ class install(_install): # XXX Python 3.1 doesn't see _nc if this is inside the class install.sub_commands = [ - cmd for cmd in _install.sub_commands if cmd[0] not in install._nc + cmd for cmd in orig.install.sub_commands if cmd[0] not in install._nc ] + install.new_commands -- cgit v1.2.1 From a2bc4f69c7f6c2cec29123669ca6ae517277b67a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 May 2014 09:31:35 -0400 Subject: Restore install._install with a comment to capture its requirement on earlier NumPy versions. Fixes #199. --HG-- extra : amend_source : a76d060c98e0048506e5aadddd675151db9d273c --- setuptools/command/install.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'setuptools/command/install.py') diff --git a/setuptools/command/install.py b/setuptools/command/install.py index 3425dbf7..1f489734 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -6,6 +6,10 @@ import platform import distutils.command.install as orig from distutils.errors import DistutilsArgError +# Prior to numpy 1.9, NumPy relies on the '_install' name, so provide it for +# now. See https://bitbucket.org/pypa/setuptools/issue/199/ +_install = orig.install + class install(orig.install): """Use easy_install to install the package, w/dependencies""" -- cgit v1.2.1 From 8e3f9d3253d1d0fb820dad4249d5110d017595c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Gr=C3=B6nholm?= Date: Wed, 18 Jun 2014 20:31:05 +0300 Subject: Fixed PEP 8 compliancy of the setuptools.command package --- setuptools/command/install.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'setuptools/command/install.py') diff --git a/setuptools/command/install.py b/setuptools/command/install.py index 1f489734..d2bca2ec 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -1,22 +1,24 @@ -import setuptools +from distutils.errors import DistutilsArgError import inspect import glob import warnings import platform import distutils.command.install as orig -from distutils.errors import DistutilsArgError + +import setuptools # Prior to numpy 1.9, NumPy relies on the '_install' name, so provide it for -# now. See https://bitbucket.org/pypa/setuptools/issue/199/ +# now. See https://bitbucket.org/pypa/setuptools/issue/199/ _install = orig.install + class install(orig.install): """Use easy_install to install the package, w/dependencies""" user_options = orig.install.user_options + [ ('old-and-unmanageable', None, "Try not to use this!"), ('single-version-externally-managed', None, - "used by system package builders to create 'flat' eggs"), + "used by system package builders to create 'flat' eggs"), ] boolean_options = orig.install.boolean_options + [ 'old-and-unmanageable', 'single-version-externally-managed', @@ -115,7 +117,9 @@ class install(orig.install): cmd.run() setuptools.bootstrap_install_from = None + # XXX Python 3.1 doesn't see _nc if this is inside the class -install.sub_commands = [ - cmd for cmd in orig.install.sub_commands if cmd[0] not in install._nc - ] + install.new_commands +install.sub_commands = ( + [cmd for cmd in orig.install.sub_commands if cmd[0] not in install._nc] + + install.new_commands +) -- cgit v1.2.1 From 3b90be7bb6323eb44d0f28864509c1d47aa098de Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Mar 2016 12:17:06 -0400 Subject: Update most bitbucket references to point to Github now. Fixes #422. --- setuptools/command/install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'setuptools/command/install.py') diff --git a/setuptools/command/install.py b/setuptools/command/install.py index d2bca2ec..31a5ddb5 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -8,7 +8,7 @@ import distutils.command.install as orig import setuptools # Prior to numpy 1.9, NumPy relies on the '_install' name, so provide it for -# now. See https://bitbucket.org/pypa/setuptools/issue/199/ +# now. See https://github.com/pypa/setuptools/issues/199/ _install = orig.install -- cgit v1.2.1 From b8101f06532b1deab448e6e23d0a61eb125c62df Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Thu, 14 Nov 2019 22:01:09 +0100 Subject: deprecate easy_install command --- setuptools/command/install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'setuptools/command/install.py') diff --git a/setuptools/command/install.py b/setuptools/command/install.py index 31a5ddb5..72b9a3e4 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -114,7 +114,7 @@ class install(orig.install): args.insert(0, setuptools.bootstrap_install_from) cmd.args = args - cmd.run() + cmd.run(show_deprecation=False) setuptools.bootstrap_install_from = None -- cgit v1.2.1 From fc5c3083908170e1cbfd1dec91f87a3e2707e3fa Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 22 Oct 2021 15:27:51 -0400 Subject: Deprecate setup.py install and easy_install. Ref #917. --- setuptools/command/install.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'setuptools/command/install.py') diff --git a/setuptools/command/install.py b/setuptools/command/install.py index 72b9a3e4..35e54d20 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -30,6 +30,13 @@ class install(orig.install): _nc = dict(new_commands) def initialize_options(self): + + warnings.warn( + "setup.py install is deprecated. " + "Use build and pip and other standards-based tools.", + setuptools.SetuptoolsDeprecationWarning, + ) + orig.install.initialize_options(self) self.old_and_unmanageable = None self.single_version_externally_managed = None -- cgit v1.2.1