Obsoleted by python-pip from RHEL 7.7+ and python-pip-epel from EPEL7

This commit is contained in:
Miro Hrončok 2019-10-07 19:10:27 +02:00
parent b36d323135
commit 6771a1c54f
8 changed files with 1 additions and 2055 deletions

18
.gitignore vendored
View File

@ -1,18 +0,0 @@
pip-0.7.2.tar.gz
/pip-0.8.tar.gz
/pip-0.8.2.tar.gz
/pip-0.8.3.tar.gz
/pip-1.0.2.tar.gz
/pip-1.1.tar.gz
/pip-1.3.1.tar.gz
/pip-1.4.1.tar.gz
/pip-1.5.4.tar.gz
/pip-1.5.6.tar.gz
/pip-1.5.6-tests.tar.gz
/pip-6.0.8.tar.gz
/pip-7.0.3.tar.gz
/pip-7.1.0.tar.gz
/pip-7.1.0-tests.tar.gz
/pip-8.0.2.tar.gz
/pip-8.1.2.tar.gz
/pip-8.1.2-tests.tar.gz

View File

@ -1,29 +0,0 @@
From 1dc2aa897ddda51503572f3f70a4818cf9a3884d Mon Sep 17 00:00:00 2001
From: Tomas Orsava <torsava@redhat.com>
Date: Fri, 17 Mar 2017 13:14:56 +0100
Subject: [PATCH] Fix `pip install` in FIPS mode
Resolves: rhbz#1430774
---
pip/utils/hashes.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/pip/utils/hashes.py b/pip/utils/hashes.py
index 9602970..c6d7524 100644
--- a/pip/utils/hashes.py
+++ b/pip/utils/hashes.py
@@ -39,7 +39,10 @@ class Hashes(object):
gots = {}
for hash_name in iterkeys(self._allowed):
try:
- gots[hash_name] = hashlib.new(hash_name)
+ if hash_name == 'md5':
+ gots[hash_name] = hashlib.new(hash_name, usedforsecurity=False)
+ else:
+ gots[hash_name] = hashlib.new(hash_name)
except (ValueError, TypeError):
raise InstallationError('Unknown hash name: %s' % hash_name)
--
2.11.0

View File

@ -1,117 +0,0 @@
From 7b3991c99cd8bb9358e109901d4aa8f51269a87a Mon Sep 17 00:00:00 2001
From: Tomas Orsava <tomas.n@orsava.cz>
Date: Tue, 17 May 2016 16:40:37 +0200
Subject: [PATCH] Allow stripping given prefix from wheel RECORD files
Update of a previous patch [0] by Slavek Kabrda <bkabrda@redhat.com>.
Changes in the pip/wheel.py file in upstream prevented #2 hunk from being
applied cleanly.
[0] pip-1.5rc1-allow-stripping-prefix-from-wheel-RECORD-files.patch
---
pip/commands/install.py | 9 +++++++++
pip/req/req_install.py | 13 +++++++++----
pip/wheel.py | 8 ++++++--
3 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/pip/commands/install.py b/pip/commands/install.py
index 7ddde93..e31bd3e 100644
--- a/pip/commands/install.py
+++ b/pip/commands/install.py
@@ -137,6 +137,14 @@ class InstallCommand(RequirementCommand):
"directory.")
cmd_opts.add_option(
+ '--strip-file-prefix',
+ dest='strip_file_prefix',
+ metavar='prefix',
+ default=None,
+ help="Strip given prefix from script paths in wheel RECORD."
+ )
+
+ cmd_opts.add_option(
'--prefix',
dest='prefix_path',
metavar='dir',
@@ -315,6 +323,7 @@ class InstallCommand(RequirementCommand):
global_options,
root=options.root_path,
prefix=options.prefix_path,
+ strip_file_prefix=options.strip_file_prefix,
)
reqs = sorted(
requirement_set.successfully_installed,
diff --git a/pip/req/req_install.py b/pip/req/req_install.py
index 9e9fbbb..47f263f 100644
--- a/pip/req/req_install.py
+++ b/pip/req/req_install.py
@@ -818,8 +818,7 @@ class InstallRequirement(object):
else:
return True
- def install(self, install_options, global_options=[], root=None,
- prefix=None):
+ def install(self, install_options, global_options=[], root=None, prefix=None, strip_file_prefix=None):
if self.editable:
self.install_editable(
install_options, global_options, prefix=prefix)
@@ -828,7 +827,12 @@ class InstallRequirement(object):
version = pip.wheel.wheel_version(self.source_dir)
pip.wheel.check_compatibility(version, self.name)
- self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
+ self.move_wheel_files(
+ self.source_dir,
+ root=root,
+ prefix=prefix,
+ strip_file_prefix=strip_file_prefix
+ )
self.install_succeeded = True
return
@@ -1021,7 +1025,7 @@ class InstallRequirement(object):
def is_wheel(self):
return self.link and self.link.is_wheel
- def move_wheel_files(self, wheeldir, root=None, prefix=None):
+ def move_wheel_files(self, wheeldir, root=None, prefix=None, strip_file_prefix=None):
move_wheel_files(
self.name, self.req, wheeldir,
user=self.use_user_site,
@@ -1030,6 +1034,7 @@ class InstallRequirement(object):
prefix=prefix,
pycompile=self.pycompile,
isolated=self.isolated,
+ strip_file_prefix=strip_file_prefix,
)
def get_dist(self):
diff --git a/pip/wheel.py b/pip/wheel.py
index b257d76..6d78ce6 100644
--- a/pip/wheel.py
+++ b/pip/wheel.py
@@ -238,7 +238,7 @@ def get_entrypoints(filename):
def move_wheel_files(name, req, wheeldir, user=False, home=None, root=None,
- pycompile=True, scheme=None, isolated=False, prefix=None):
+ pycompile=True, scheme=None, isolated=False, prefix=None, strip_file_prefix=None):
"""Install a wheel"""
if not scheme:
@@ -522,7 +522,11 @@ if __name__ == '__main__':
writer.writerow(row)
for f in generated:
h, l = rehash(f)
- writer.writerow((normpath(f, lib_dir), h, l))
+ final_path = normpath(f, lib_dir)
+ if strip_file_prefix and final_path.startswith(strip_file_prefix):
+ final_path = os.path.join(os.sep,
+ os.path.relpath(final_path, strip_file_prefix))
+ writer.writerow((final_path, h, l))
for f in installed:
writer.writerow((installed[f], '', ''))
shutil.move(temp_record, record)
--
2.5.5

1
dead.package Normal file
View File

@ -0,0 +1 @@
Obsoleted by python-pip from RHEL 7.7+ and python-pip-epel from EPEL7

View File

@ -1,395 +0,0 @@
diff --git a/pip/cmdoptions.py b/pip/cmdoptions.py
index 8ed3d91..01b2104 100644
--- a/pip/cmdoptions.py
+++ b/pip/cmdoptions.py
@@ -9,7 +9,7 @@ To be consistent, all options will follow this design.
"""
import copy
from optparse import OptionGroup, SUPPRESS_HELP, Option
-from pip.locations import build_prefix, default_log_file
+from pip.locations import default_log_file
def make_option_group(group, parser):
@@ -297,10 +297,8 @@ build_dir = OptionMaker(
'-b', '--build', '--build-dir', '--build-directory',
dest='build_dir',
metavar='dir',
- default=build_prefix,
- help='Directory to unpack packages into and build in. '
- 'The default in a virtualenv is "<venv path>/build". '
- 'The default for global installs is "<OS temp dir>/pip_build_<username>".')
+ help='Directory to unpack packages into and build in.',
+)
install_options = OptionMaker(
'--install-option',
diff --git a/pip/commands/install.py b/pip/commands/install.py
index cbf22a0..cb7d0db 100644
--- a/pip/commands/install.py
+++ b/pip/commands/install.py
@@ -10,6 +10,7 @@ from pip.basecommand import Command
from pip.index import PackageFinder
from pip.exceptions import InstallationError, CommandError, PreviousBuildDirError
from pip import cmdoptions
+from pip.util import BuildDirectory
class InstallCommand(Command):
@@ -188,7 +189,7 @@ class InstallCommand(Command):
if (
options.no_install or
options.no_download or
- (options.build_dir != build_prefix) or
+ options.build_dir or
options.no_clean
):
logger.deprecated('1.7', 'DEPRECATION: --no-install, --no-download, --build, '
@@ -197,7 +198,16 @@ class InstallCommand(Command):
if options.download_dir:
options.no_install = True
options.ignore_installed = True
- options.build_dir = os.path.abspath(options.build_dir)
+
+ # If we have --no-install or --no-download and no --build we use the
+ # legacy static build dir
+ if (options.build_dir is None
+ and (options.no_install or options.no_download)):
+ options.build_dir = build_prefix
+
+ if options.build_dir:
+ options.build_dir = os.path.abspath(options.build_dir)
+
options.src_dir = os.path.abspath(options.src_dir)
install_options = options.install_options or []
if options.use_user_site:
@@ -246,73 +256,75 @@ class InstallCommand(Command):
finder = self._build_package_finder(options, index_urls, session)
- requirement_set = RequirementSet(
- build_dir=options.build_dir,
- src_dir=options.src_dir,
- download_dir=options.download_dir,
- download_cache=options.download_cache,
- upgrade=options.upgrade,
- as_egg=options.as_egg,
- ignore_installed=options.ignore_installed,
- ignore_dependencies=options.ignore_dependencies,
- force_reinstall=options.force_reinstall,
- use_user_site=options.use_user_site,
- target_dir=temp_target_dir,
- session=session,
- pycompile=options.compile,
- )
- for name in args:
- requirement_set.add_requirement(
- InstallRequirement.from_line(name, None))
- for name in options.editables:
- requirement_set.add_requirement(
- InstallRequirement.from_editable(name, default_vcs=options.default_vcs))
- for filename in options.requirements:
- for req in parse_requirements(filename, finder=finder, options=options, session=session):
- requirement_set.add_requirement(req)
- if not requirement_set.has_requirements:
- opts = {'name': self.name}
- if options.find_links:
- msg = ('You must give at least one requirement to %(name)s '
- '(maybe you meant "pip %(name)s %(links)s"?)' %
- dict(opts, links=' '.join(options.find_links)))
- else:
- msg = ('You must give at least one requirement '
- 'to %(name)s (see "pip help %(name)s")' % opts)
- logger.warn(msg)
- return
-
- try:
- if not options.no_download:
- requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
- else:
- requirement_set.locate_files()
-
- if not options.no_install and not self.bundle:
- requirement_set.install(
- install_options,
- global_options,
- root=options.root_path,
- strip_file_prefix=options.strip_file_prefix)
- installed = ' '.join([req.name for req in
- requirement_set.successfully_installed])
- if installed:
- logger.notify('Successfully installed %s' % installed)
- elif not self.bundle:
- downloaded = ' '.join([req.name for req in
- requirement_set.successfully_downloaded])
- if downloaded:
- logger.notify('Successfully downloaded %s' % downloaded)
- elif self.bundle:
- requirement_set.create_bundle(self.bundle_filename)
- logger.notify('Created bundle in %s' % self.bundle_filename)
- except PreviousBuildDirError:
- options.no_clean = True
- raise
- finally:
- # Clean up
- if (not options.no_clean) and ((not options.no_install) or options.download_dir):
- requirement_set.cleanup_files(bundle=self.bundle)
+ build_delete = (not (options.no_clean or options.build_dir))
+ with BuildDirectory(options.build_dir, delete=build_delete) as build_dir:
+ requirement_set = RequirementSet(
+ build_dir=build_dir,
+ src_dir=options.src_dir,
+ download_dir=options.download_dir,
+ download_cache=options.download_cache,
+ upgrade=options.upgrade,
+ as_egg=options.as_egg,
+ ignore_installed=options.ignore_installed,
+ ignore_dependencies=options.ignore_dependencies,
+ force_reinstall=options.force_reinstall,
+ use_user_site=options.use_user_site,
+ target_dir=temp_target_dir,
+ session=session,
+ pycompile=options.compile,
+ )
+ for name in args:
+ requirement_set.add_requirement(
+ InstallRequirement.from_line(name, None))
+ for name in options.editables:
+ requirement_set.add_requirement(
+ InstallRequirement.from_editable(name, default_vcs=options.default_vcs))
+ for filename in options.requirements:
+ for req in parse_requirements(filename, finder=finder, options=options, session=session):
+ requirement_set.add_requirement(req)
+ if not requirement_set.has_requirements:
+ opts = {'name': self.name}
+ if options.find_links:
+ msg = ('You must give at least one requirement to %(name)s '
+ '(maybe you meant "pip %(name)s %(links)s"?)' %
+ dict(opts, links=' '.join(options.find_links)))
+ else:
+ msg = ('You must give at least one requirement '
+ 'to %(name)s (see "pip help %(name)s")' % opts)
+ logger.warn(msg)
+ return
+
+ try:
+ if not options.no_download:
+ requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
+ else:
+ requirement_set.locate_files()
+
+ if not options.no_install and not self.bundle:
+ requirement_set.install(
+ install_options,
+ global_options,
+ root=options.root_path,
+ strip_file_prefix=options.strip_file_prefix)
+ installed = ' '.join([req.name for req in
+ requirement_set.successfully_installed])
+ if installed:
+ logger.notify('Successfully installed %s' % installed)
+ elif not self.bundle:
+ downloaded = ' '.join([req.name for req in
+ requirement_set.successfully_downloaded])
+ if downloaded:
+ logger.notify('Successfully downloaded %s' % downloaded)
+ elif self.bundle:
+ requirement_set.create_bundle(self.bundle_filename)
+ logger.notify('Created bundle in %s' % self.bundle_filename)
+ except PreviousBuildDirError:
+ options.no_clean = True
+ raise
+ finally:
+ # Clean up
+ if (not options.no_clean) and ((not options.no_install) or options.download_dir):
+ requirement_set.cleanup_files(bundle=self.bundle)
if options.target_dir:
if not os.path.exists(options.target_dir):
diff --git a/pip/commands/wheel.py b/pip/commands/wheel.py
index 6527063..a96631a 100644
--- a/pip/commands/wheel.py
+++ b/pip/commands/wheel.py
@@ -8,7 +8,7 @@ from pip.index import PackageFinder
from pip.log import logger
from pip.exceptions import CommandError, PreviousBuildDirError
from pip.req import InstallRequirement, RequirementSet, parse_requirements
-from pip.util import normalize_path
+from pip.util import BuildDirectory, normalize_path
from pip.wheel import WheelBuilder
from pip import cmdoptions
@@ -123,6 +123,9 @@ class WheelCommand(Command):
"--extra-index-url is suggested.")
index_urls += options.mirrors
+ if options.build_dir:
+ options.build_dir = os.path.abspath(options.build_dir)
+
session = self._build_session(options)
finder = PackageFinder(find_links=options.find_links,
@@ -137,59 +140,60 @@ class WheelCommand(Command):
session=session,
)
- options.build_dir = os.path.abspath(options.build_dir)
- requirement_set = RequirementSet(
- build_dir=options.build_dir,
- src_dir=None,
- download_dir=None,
- download_cache=options.download_cache,
- ignore_dependencies=options.ignore_dependencies,
- ignore_installed=True,
- session=session,
- wheel_download_dir=options.wheel_dir
- )
-
- # make the wheelhouse
- if not os.path.exists(options.wheel_dir):
- os.makedirs(options.wheel_dir)
-
- #parse args and/or requirements files
- for name in args:
- requirement_set.add_requirement(
- InstallRequirement.from_line(name, None))
-
- for filename in options.requirements:
- for req in parse_requirements(
- filename,
- finder=finder,
- options=options,
- session=session):
- if req.editable:
- logger.notify("ignoring %s" % req.url)
- continue
- requirement_set.add_requirement(req)
-
- #fail if no requirements
- if not requirement_set.has_requirements:
- opts = {'name': self.name}
- msg = ('You must give at least one requirement '
- 'to %(name)s (see "pip help %(name)s")' % opts)
- logger.error(msg)
- return
+ build_delete = (not (options.no_clean or options.build_dir))
+ with BuildDirectory(options.build_dir, delete=build_delete) as build_dir:
+ requirement_set = RequirementSet(
+ build_dir=build_dir,
+ src_dir=None,
+ download_dir=None,
+ download_cache=options.download_cache,
+ ignore_dependencies=options.ignore_dependencies,
+ ignore_installed=True,
+ session=session,
+ wheel_download_dir=options.wheel_dir
+ )
- try:
- #build wheels
- wb = WheelBuilder(
- requirement_set,
- finder,
- options.wheel_dir,
- build_options = options.build_options or [],
- global_options = options.global_options or []
- )
- wb.build()
- except PreviousBuildDirError:
- options.no_clean = True
- raise
- finally:
- if not options.no_clean:
- requirement_set.cleanup_files()
+ # make the wheelhouse
+ if not os.path.exists(options.wheel_dir):
+ os.makedirs(options.wheel_dir)
+
+ #parse args and/or requirements files
+ for name in args:
+ requirement_set.add_requirement(
+ InstallRequirement.from_line(name, None))
+
+ for filename in options.requirements:
+ for req in parse_requirements(
+ filename,
+ finder=finder,
+ options=options,
+ session=session):
+ if req.editable:
+ logger.notify("ignoring %s" % req.url)
+ continue
+ requirement_set.add_requirement(req)
+
+ #fail if no requirements
+ if not requirement_set.has_requirements:
+ opts = {'name': self.name}
+ msg = ('You must give at least one requirement '
+ 'to %(name)s (see "pip help %(name)s")' % opts)
+ logger.error(msg)
+ return
+
+ try:
+ #build wheels
+ wb = WheelBuilder(
+ requirement_set,
+ finder,
+ options.wheel_dir,
+ build_options = options.build_options or [],
+ global_options = options.global_options or []
+ )
+ wb.build()
+ except PreviousBuildDirError:
+ options.no_clean = True
+ raise
+ finally:
+ if not options.no_clean:
+ requirement_set.cleanup_files()
diff --git a/pip/util.py b/pip/util.py
index f459bb2..f5edeeb 100644
--- a/pip/util.py
+++ b/pip/util.py
@@ -8,6 +8,7 @@ import zipfile
import tarfile
import subprocess
import textwrap
+import tempfile
from pip.exceptions import InstallationError, BadCommand, PipError
from pip.backwardcompat import(WindowsError, string_types, raw_input,
@@ -718,3 +719,35 @@ def is_prerelease(vers):
parsed = version._normalized_key(normalized)
return any([any([y in set(["a", "b", "c", "rc", "dev"]) for y in x]) for x in parsed])
+
+
+class BuildDirectory(object):
+
+ def __init__(self, name=None, delete=None):
+ # If we were not given an explicit directory, and we were not given an
+ # explicit delete option, then we'll default to deleting.
+ if name is None and delete is None:
+ delete = True
+
+ if name is None:
+ name = tempfile.mkdtemp(prefix="pip-build-")
+ # If we were not given an explicit directory, and we were not given
+ # an explicit delete option, then we'll default to deleting.
+ if delete is None:
+ delete = True
+
+ self.name = name
+ self.delete = delete
+
+ def __repr__(self):
+ return "<{} {!r}>".format(self.__class__.__name__, self.name)
+
+ def __enter__(self):
+ return self.name
+
+ def __exit__(self, exc, value, tb):
+ self.cleanup()
+
+ def cleanup(self):
+ if self.delete:
+ rmtree(self.name)

View File

@ -1,439 +0,0 @@
%global with_python3 1
# python34 and python36 will share a bash-completion file, so don't try to
# enable with_python3_other without with_python3.
%global with_python3_other 1
%global build_wheel 0
%global with_tests 0
%global srcname pip
%if 0%{?build_wheel}
%global python2_wheelname %{srcname}-%{version}-py2.py3-none-any.whl
%if 0%{?with_python3}
%global python3_wheelname %python2_wheelname
%endif
%endif
Name: python-%{srcname}
Version: 8.1.2
Release: 8%{?dist}
Summary: A tool for installing and managing Python packages
Group: Development/Libraries
License: MIT
URL: http://www.pip-installer.org
Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# to get tests:
# git clone https://github.com/pypa/pip && cd pip
# git checkout 8.0.2 && tar -czvf pip-8.0.2-tests.tar.gz tests/
%if 0%{?with_tests}
Source1: pip-8.1.2-tests.tar.gz
%endif
# Patch until the following issue gets implemented upstream:
# https://github.com/pypa/pip/issues/1351
Patch0: allow-stripping-given-prefix-from-wheel-RECORD-files.patch
# Fix `pip install` failure in FIPS mode
# Resolves: rhbz#1430774
Patch1: Fix-pip-install-in-FIPS-mode.patch
%description
Pip is a replacement for `easy_install
<http://peak.telecommunity.com/DevCenter/EasyInstall>`_. It uses mostly the
same techniques for finding packages, so packages that were made
easy_installable should be pip-installable as well.
%package -n python2-%{srcname}
Summary: A tool for installing and managing Python 2 packages
Group: Development/Libraries
BuildRequires: python2-devel
BuildRequires: python-setuptools
%if 0%{?with_tests}
BuildRequires: git
BuildRequires: bzr
BuildRequires: python-mock
BuildRequires: pytest
BuildRequires: python-pretend
BuildRequires: python-freezegun
BuildRequires: python-pytest-capturelog
BuildRequires: python-scripttest
BuildRequires: python-virtualenv
%endif
%if 0%{?build_wheel}
BuildRequires: python2-pip
BuildRequires: python2-wheel
%endif
Requires: python-setuptools
%{?python_provide:%python_provide python2-%{srcname}}
%description -n python2-%{srcname}
Pip is a replacement for `easy_install
<http://peak.telecommunity.com/DevCenter/EasyInstall>`_. It uses mostly the
same techniques for finding packages, so packages that were made
easy_installable should be pip-installable as well.
%if 0%{?with_python3}
%package -n python%{python3_pkgversion}-%{srcname}
Summary: A tool for installing and managing Python3 packages
Group: Development/Libraries
# The python3 subpackages share the pip3 bash completion file, so force them to
# be upgraded together.
Conflicts: python%{python3_other_pkgversion}-%{srcname} < %{version}-%{release}
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
%if 0%{?with_tests}
BuildRequires: python%{python3_pkgversion}-mock
BuildRequires: python%{python3_pkgversion}-pytest
BuildRequires: python%{python3_pkgversion}-pretend
BuildRequires: python%{python3_pkgversion}-freezegun
BuildRequires: python%{python3_pkgversion}-pytest-capturelog
BuildRequires: python%{python3_pkgversion}-scripttest
BuildRequires: python%{python3_pkgversion}-virtualenv
%endif
%if 0%{?build_wheel}
BuildRequires: python%{python3_pkgversion}-pip
BuildRequires: python%{python3_pkgversion}-wheel
%endif
Requires: python%{python3_pkgversion}-setuptools
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
%description -n python%{python3_pkgversion}-%{srcname}
Pip is a replacement for `easy_install
<http://peak.telecommunity.com/DevCenter/EasyInstall>`_. It uses mostly the
same techniques for finding packages, so packages that were made
easy_installable should be pip-installable as well.
%endif # with_python3
%if 0%{?with_python3}
%package -n python%{python3_other_pkgversion}-%{srcname}
Summary: A tool for installing and managing Python3 packages
# The python3 subpackages share the pip3 bash completion file, so force them to
# be upgraded together.
Conflicts: python%{python3_pkgversion}-%{srcname} < %{version}-%{release}
BuildRequires: python%{python3_other_pkgversion}-devel
BuildRequires: python%{python3_other_pkgversion}-setuptools
%if 0%{?with_tests}
BuildRequires: python%{python3_other_pkgversion}-mock
BuildRequires: python%{python3_other_pkgversion}-pytest
BuildRequires: python%{python3_other_pkgversion}-pretend
BuildRequires: python%{python3_other_pkgversion}-freezegun
BuildRequires: python%{python3_other_pkgversion}-pytest-capturelog
BuildRequires: python%{python3_other_pkgversion}-scripttest
BuildRequires: python%{python3_other_pkgversion}-virtualenv
%endif
%if 0%{?build_wheel}
BuildRequires: python%{python3_other_pkgversion}-pip
BuildRequires: python%{python3_other_pkgversion}-wheel
%endif
Requires: python%{python3_other_pkgversion}-setuptools
%description -n python%{python3_other_pkgversion}-%{srcname}
Pip is a replacement for `easy_install
<http://peak.telecommunity.com/DevCenter/EasyInstall>`_. It uses mostly the
same techniques for finding packages, so packages that were made
easy_installable should be pip-installable as well.
%endif # with_python3_other
%prep
%setup -q -n %{srcname}-%{version}
%if 0%{?with_tests}
tar -xf %{SOURCE1}
%endif
%patch0 -p1
%patch1 -p1
sed -i '1d' pip/__init__.py
%build
%if 0%{?build_wheel}
%py2_build_wheel
%else
%py2_build
%endif
%if 0%{?with_python3}
%if 0%{?build_wheel}
%{?with_python3_other:%py3_other_build_wheel}
%py3_build_wheel
%else
%{?with_python3_other:%py3_other_build}
%py3_build
%endif
%endif # with_python3
%install
%if 0%{?with_python3}
%if 0%{?build_wheel}
%if 0%{?with_python3_other}
%py3_other_install_wheel %{python3_wheelname}
# TODO: we have to remove this by hand now, but it'd be nice if we wouldn't have to
# (pip install wheel doesn't overwrite)
rm %{buildroot}%{_bindir}/pip{,3}
%endif # with_python3_other
%py3_install_wheel %{python3_wheelname}
# TODO: we have to remove this by hand now, but it'd be nice if we wouldn't have to
# (pip install wheel doesn't overwrite)
rm %{buildroot}%{_bindir}/pip
%else
%{?with_python3_other:%py3_other_install}
%py3_install
%endif
%endif # with_python3
%if 0%{?build_wheel}
%py2_install_wheel %{python2_wheelname}
%else
%py2_install
%endif
mkdir -p %{buildroot}%{bash_completion_dir}
PYTHONPATH=%{buildroot}%{python_sitelib} \
%{buildroot}%{_bindir}/pip completion --bash \
> %{buildroot}%{bash_completion_dir}/pip
%if 0%{?with_python3}
PYTHONPATH=%{buildroot}%{python3_sitelib} \
%{buildroot}%{_bindir}/pip3 completion --bash \
> %{buildroot}%{bash_completion_dir}/pip3
%endif
pips2=pip
pips3=pip3
for pip in %{buildroot}%{_bindir}/pip*; do
pip=$(basename $pip)
case $pip in
pip2*)
pips2="$pips2 $pip"
ln -s pip %{buildroot}%{bash_completion_dir}/$pip
;;
%if 0%{?with_python3}
pip3?*)
pips3="$pips3 $pip"
ln -s pip3 %{buildroot}%{bash_completion_dir}/$pip
;;
%endif
esac
done
%if 0%{?with_python3}
sed -i -e "s/^\\(complete.*\\) pip\$/\\1 $pips3/" \
-e s/_pip_completion/_pip3_completion/ \
%{buildroot}%{bash_completion_dir}/pip3
%endif
sed -i -e "s/^\\(complete.*\\) pip\$/\\1 $pips2/" \
%{buildroot}%{bash_completion_dir}/pip
%if 0%{?with_tests}
%check
py.test -m 'not network'
%{?with_python3:py.test-%{python3_version} -m 'not network'}
%{?with_python3_other:py.test-%{python3_other_version} -m 'not network'}
%endif
%files -n python2-%{srcname}
%license LICENSE.txt
%doc README.rst docs
%{_bindir}/pip
%{_bindir}/pip2
%{_bindir}/pip%{python2_version}
%{python_sitelib}/pip
%{python_sitelib}/pip-%{version}-py%{python2_version}.egg-info
%dir %{_datadir}/bash-completion
%dir %{bash_completion_dir}
%{bash_completion_dir}/pip
%{bash_completion_dir}/pip2
%{bash_completion_dir}/pip%{python2_version}
%if 0%{?with_python3}
%files -n python%{python3_pkgversion}-%{srcname}
%license LICENSE.txt
%doc README.rst docs
%{_bindir}/pip3
%{_bindir}/pip%{python3_version}
%{python3_sitelib}/pip
%{python3_sitelib}/pip-%{version}-py%{python3_version}.egg-info
%dir %{_datadir}/bash-completion
%dir %{bash_completion_dir}
%{bash_completion_dir}/pip3
%{bash_completion_dir}/pip%{python3_version}
%endif # with_python3
%if 0%{?with_python3_other}
%files -n python%{python3_other_pkgversion}-%{srcname}
%license LICENSE.txt
%doc README.rst docs
%{_bindir}/pip%{python3_other_version}
%{python3_other_sitelib}/pip
%{python3_other_sitelib}/pip-%{version}-py%{python3_other_version}.egg-info
%dir %{_datadir}/bash-completion
%dir %{bash_completion_dir}
%{bash_completion_dir}/pip3
%{bash_completion_dir}/pip%{python3_other_version}
%endif # with_python3_other
%changelog
* Thu Mar 07 2019 Troy Dawson <tdawson@redhat.com> - 8.1.2-8
- Rebuilt to change main python from 3.4 to 3.6
* Thu Jan 10 2019 Carl George <carl@george.computer> - 8.1.2-7
- Simplify bash-completion just for EL7
- Add python36 subpackage
* Wed Apr 04 2018 Tomas Orsava <torsava@redhat.com> - 8.1.2-6
- Added Patch 1: Fix `pip install` failure in FIPS mode
Resolves: rhbz#1430774
* Fri Nov 18 2016 Orion Poplawski <orion@cora.nwra.com> - 8.1.2-5
- Enable EPEL Python 3 builds
- Use new python macros
- Cleanup spec
- Without wheel
* Fri Aug 05 2016 Tomas Orsava <torsava@redhat.com> - 8.1.2-4
- Updated the test sources
* Fri Aug 05 2016 Tomas Orsava <torsava@redhat.com> - 8.1.2-3
- Moved python-pip into the python2-pip subpackage
- Added the python_provide macro
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.1.2-2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Tue May 17 2016 Tomas Orsava <torsava@redhat.com> - 8.1.2-1
- Update to 8.1.2
- Moved to a new PyPI URL format
- Updated the prefix-stripping patch because of upstream changes in pip/wheel.py
* Mon Feb 22 2016 Slavek Kabrda <bkabrda@redhat.com> - 8.0.2-1
- Update to 8.0.2
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 7.1.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Oct 14 2015 Robert Kuska <rkuska@redhat.com> - 7.1.0-3
- Rebuilt for Python3.5 rebuild
- With wheel set to 1
* Tue Oct 13 2015 Robert Kuska <rkuska@redhat.com> - 7.1.0-2
- Rebuilt for Python3.5 rebuild
* Wed Jul 01 2015 Slavek Kabrda <bkabrda@redhat.com> - 7.1.0-1
- Update to 7.1.0
* Tue Jun 30 2015 Ville Skyttä <ville.skytta@iki.fi> - 7.0.3-3
- Install bash completion
- Ship LICENSE.txt as %%license where available
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.0.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Thu Jun 04 2015 Matej Stuchlik <mstuchli@redhat.com> - 7.0.3-1
- Update to 7.0.3
* Fri Mar 06 2015 Matej Stuchlik <mstuchli@redhat.com> - 6.0.8-1
- Update to 6.0.8
* Thu Dec 18 2014 Slavek Kabrda <bkabrda@redhat.com> - 1.5.6-5
- Only enable tests on Fedora.
* Mon Dec 01 2014 Matej Stuchlik <mstuchli@redhat.com> - 1.5.6-4
- Add tests
- Add patch skipping tests requiring Internet access
* Tue Nov 18 2014 Matej Stuchlik <mstuchli@redhat.com> - 1.5.6-3
- Added patch for local dos with predictable temp dictionary names
(http://seclists.org/oss-sec/2014/q4/655)
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sun May 25 2014 Matej Stuchlik <mstuchli@redhat.com> - 1.5.6-1
- Update to 1.5.6
* Fri Apr 25 2014 Matej Stuchlik <mstuchli@redhat.com> - 1.5.4-4
- Rebuild as wheel for Python 3.4
* Thu Apr 24 2014 Matej Stuchlik <mstuchli@redhat.com> - 1.5.4-3
- Disable build_wheel
* Thu Apr 24 2014 Matej Stuchlik <mstuchli@redhat.com> - 1.5.4-2
- Rebuild as wheel for Python 3.4
* Mon Apr 07 2014 Matej Stuchlik <mstuchli@redhat.com> - 1.5.4-1
- Updated to 1.5.4
* Mon Oct 14 2013 Tim Flink <tflink@fedoraproject.org> - 1.4.1-1
- Removed patch for CVE 2013-2099 as it has been included in the upstream 1.4.1 release
- Updated version to 1.4.1
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Tue Jul 16 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 1.3.1-4
- Fix for CVE 2013-2099
* Thu May 23 2013 Tim Flink <tflink@fedoraproject.org> - 1.3.1-3
- undo python2 executable rename to python-pip. fixes #958377
- fix summary to match upstream
* Mon May 06 2013 Kevin Kofler <Kevin@tigcc.ticalc.org> - 1.3.1-2
- Fix main package Summary, it's for Python 2, not 3 (#877401)
* Fri Apr 26 2013 Jon Ciesla <limburgher@gmail.com> - 1.3.1-1
- Update to 1.3.1, fix for CVE-2013-1888.
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Tue Oct 09 2012 Tim Flink <tflink@fedoraproject.org> - 1.2.1-2
- Fixing files for python3-pip
* Thu Oct 04 2012 Tim Flink <tflink@fedoraproject.org> - 1.2.1-1
- Update to upstream 1.2.1
- Change binary from pip-python to python-pip (RHBZ#855495)
- Add alias from python-pip to pip-python, to be removed at a later date
* Tue May 15 2012 Tim Flink <tflink@fedoraproject.org> - 1.1.0-1
- Update to upstream 1.1.0
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Sat Oct 22 2011 Tim Flink <tflink@fedoraproject.org> - 1.0.2-1
- update to 1.0.2 and added python3 subpackage
* Wed Jun 22 2011 Tim Flink <tflink@fedoraproject.org> - 0.8.3-1
- update to 0.8.3 and project home page
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Mon Dec 20 2010 Luke Macken <lmacken@redhat.com> - 0.8.2-1
- update to 0.8.2 of pip
* Mon Aug 30 2010 Peter Halliday <phalliday@excelsiorsystems.net> - 0.8-1
- update to 0.8 of pip
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.7.2-5
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
* Wed Jul 7 2010 Peter Halliday <phalliday@excelsiorsystems.net> - 0.7.2-1
- update to 0.7.2 of pip
* Sun May 23 2010 Peter Halliday <phalliday@excelsiorsystems.net> - 0.7.1-1
- update to 0.7.1 of pip
* Fri Jan 1 2010 Peter Halliday <phalliday@excelsiorsystems.net> - 0.6.1.4
- fix dependency issue
* Fri Dec 18 2009 Peter Halliday <phalliday@excelsiorsystems.net> - 0.6.1-2
- fix spec file
* Thu Dec 17 2009 Peter Halliday <phalliday@excelsiorsystems.net> - 0.6.1-1
- upgrade to 0.6.1 of pip
* Mon Aug 31 2009 Peter Halliday <phalliday@excelsiorsystems.net> - 0.4-1
- Initial package

File diff suppressed because it is too large Load Diff

View File

@ -1,2 +0,0 @@
87083c0b9867963b29f7aba3613e8f4a pip-8.1.2.tar.gz
e489edb75d6c23727731717d96003f2b pip-8.1.2-tests.tar.gz