Revert "Add --executable option to easy_install command"
This enhancement is currently not needed and it can possibly
collide with `pip --editable`option
Reverts commit 68d566a937
.
This commit is contained in:
parent
4b01dd0dde
commit
c15bf68d49
@ -1,93 +0,0 @@
|
||||
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
|
||||
index 6d85a31..cd9f9ac 100755
|
||||
--- a/setuptools/command/easy_install.py
|
||||
+++ b/setuptools/command/easy_install.py
|
||||
@@ -147,7 +147,9 @@ class easy_install(Command):
|
||||
"allow building eggs from local checkouts"),
|
||||
('version', None, "print version information and exit"),
|
||||
('no-find-links', None,
|
||||
- "Don't load find-links defined in packages being installed")
|
||||
+ "Don't load find-links defined in packages being installed"),
|
||||
+ ('executable=', 'e',
|
||||
+ "specify final destination interpreter path")
|
||||
]
|
||||
boolean_options = [
|
||||
'zip-ok', 'multi-version', 'exclude-scripts', 'upgrade', 'always-copy',
|
||||
@@ -210,6 +212,7 @@ class easy_install(Command):
|
||||
self.distribution._set_command_options(
|
||||
self, self.distribution.get_option_dict('easy_install')
|
||||
)
|
||||
+ self.executable = None
|
||||
|
||||
def delete_blockers(self, blockers):
|
||||
extant_blockers = (
|
||||
@@ -359,6 +362,8 @@ class easy_install(Command):
|
||||
"No urls, filenames, or requirements specified (see --help)")
|
||||
|
||||
self.outputs = []
|
||||
+ if self.executable is None:
|
||||
+ self.executable = os.path.normpath(sys.executable)
|
||||
|
||||
def _fix_install_dir_for_user_site(self):
|
||||
"""
|
||||
@@ -786,7 +791,8 @@ class easy_install(Command):
|
||||
def install_wrapper_scripts(self, dist):
|
||||
if self.exclude_scripts:
|
||||
return
|
||||
- for args in ScriptWriter.best().get_args(dist):
|
||||
+ for args in ScriptWriter.best().get_args(
|
||||
+ dist, executable=self.executable):
|
||||
self.write_script(*args)
|
||||
|
||||
def install_script(self, dist, script_name, script_text, dev_path=None):
|
||||
@@ -972,7 +978,7 @@ class easy_install(Command):
|
||||
# delete entry-point scripts to avoid duping
|
||||
self.delete_blockers([
|
||||
os.path.join(script_dir, args[0])
|
||||
- for args in ScriptWriter.get_args(dist)
|
||||
+ for args in ScriptWriter.get_args(dist, executable=self.executable)
|
||||
])
|
||||
# Build .egg file from tmpdir
|
||||
bdist_egg.make_zipfile(
|
||||
@@ -2042,13 +2048,13 @@ class ScriptWriter(object):
|
||||
return cmd.as_header()
|
||||
|
||||
@classmethod
|
||||
- def get_args(cls, dist, header=None):
|
||||
+ def get_args(cls, dist, header=None, executable=None):
|
||||
"""
|
||||
Yield write_script() argument tuples for a distribution's
|
||||
console_scripts and gui_scripts entry points.
|
||||
"""
|
||||
if header is None:
|
||||
- header = cls.get_header()
|
||||
+ header = cls.get_header(executable=executable)
|
||||
spec = str(dist.as_requirement())
|
||||
for type_ in 'console', 'gui':
|
||||
group = type_ + '_scripts'
|
||||
diff --git a/setuptools/command/install.py b/setuptools/command/install.py
|
||||
index 31a5ddb..e468d05 100644
|
||||
--- a/setuptools/command/install.py
|
||||
+++ b/setuptools/command/install.py
|
||||
@@ -99,6 +99,7 @@ class install(orig.install):
|
||||
|
||||
cmd = easy_install(
|
||||
self.distribution, args="x", root=self.root, record=self.record,
|
||||
+ executable=self.executable,
|
||||
)
|
||||
cmd.ensure_finalized() # finalize before bdist_egg munges install cmd
|
||||
cmd.always_copy_from = '.' # make sure local-dir eggs get installed
|
||||
diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py
|
||||
index 1623427..570415d 100755
|
||||
--- a/setuptools/command/install_scripts.py
|
||||
+++ b/setuptools/command/install_scripts.py
|
||||
@@ -30,7 +30,8 @@ class install_scripts(orig.install_scripts):
|
||||
ei_cmd.egg_base, PathMetadata(ei_cmd.egg_base, ei_cmd.egg_info),
|
||||
ei_cmd.egg_name, ei_cmd.egg_version,
|
||||
)
|
||||
- bs_cmd = self.get_finalized_command('build_scripts')
|
||||
+ bs_cmd = (self.get_finalized_command('build_scripts', create=False) or
|
||||
+ self.get_finalized_command('install'))
|
||||
exec_param = getattr(bs_cmd, 'executable', None)
|
||||
bw_cmd = self.get_finalized_command("bdist_wininst")
|
||||
is_wininst = getattr(bw_cmd, '_is_running', False)
|
@ -30,7 +30,7 @@
|
||||
|
||||
Name: python-setuptools
|
||||
Version: 36.2.0
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: Easily build and distribute Python packages
|
||||
|
||||
Group: Applications/System
|
||||
@ -38,10 +38,6 @@ License: MIT
|
||||
URL: https://pypi.python.org/pypi/%{srcname}
|
||||
Source0: https://files.pythonhosted.org/packages/source/s/%{srcname}/%{srcname}-%{version}.zip
|
||||
|
||||
# Add --executable option to easy_install command to make it work for
|
||||
# entry_points
|
||||
Patch0: add-executable-option.patch
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: python2-devel
|
||||
%if 0%{?build_wheel}
|
||||
@ -134,8 +130,6 @@ rm -f setuptools/*.exe
|
||||
# These tests require internet connection
|
||||
rm setuptools/tests/test_integration.py
|
||||
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%if 0%{?build_wheel}
|
||||
%py2_build_wheel
|
||||
@ -220,6 +214,11 @@ LANG=en_US.utf8 PYTHONPATH=$(pwd) py.test-%{python3_version}
|
||||
%endif # with_python3
|
||||
|
||||
%changelog
|
||||
* Tue Aug 08 2017 Michal Cyprian <mcyprian@redhat.com> - 36.2.0-3
|
||||
- Revert "Add --executable option to easy_install command"
|
||||
This enhancement is currently not needed and it can possibly
|
||||
collide with `pip --editable`option
|
||||
|
||||
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 36.2.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user