diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3aa0d3d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/pip-7.1.0.tar.gz diff --git a/.rh-python35-python-pip.metadata b/.rh-python35-python-pip.metadata new file mode 100644 index 0000000..4e08cb8 --- /dev/null +++ b/.rh-python35-python-pip.metadata @@ -0,0 +1 @@ +f0254e9b58d29268125fdf08e4cac303592f26d6 SOURCES/pip-7.1.0.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/allow-stripping-prefix.patch b/SOURCES/allow-stripping-prefix.patch new file mode 100644 index 0000000..d581eee --- /dev/null +++ b/SOURCES/allow-stripping-prefix.patch @@ -0,0 +1,99 @@ +commit aefacbb76661520415a1c35028f2984e70cfe0bf +Author: Slavek Kabrda +Date: Fri Nov 29 13:24:58 2013 +0100 + + Allow stripping given prefix from wheel RECORD files + +diff --git a/pip/commands/install.py b/pip/commands/install.py +index 1693d01..0287c06 100644 +--- a/pip/commands/install.py ++++ b/pip/commands/install.py +@@ -137,6 +137,14 @@ class InstallCommand(Command): + "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( + "--compile", + action="store_true", + dest="compile", +@@ -345,6 +353,7 @@ class InstallCommand(Command): + install_options, + global_options, + root=options.root_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 3ae306d..c171130 100644 +--- a/pip/req/req_install.py ++++ b/pip/req/req_install.py +@@ -615,15 +615,19 @@ exec(compile(open(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec')) + else: + return True + +- def install(self, install_options, global_options=[], root=None): ++ def install(self, install_options, global_options=[], root=None, strip_file_prefix=None): + if self.editable: + self.install_editable(install_options, global_options) + return + if self.is_wheel: + version = pip.wheel.wheel_version(self.source_dir) + pip.wheel.check_compatibility(version, self.name) + +- self.move_wheel_files(self.source_dir, root=root) ++ self.move_wheel_files( ++ self.source_dir, ++ root=root, ++ strip_file_prefix=strip_file_prefix ++ ) + self.install_succeeded = True + return + +@@ -844,14 +848,15 @@ exec(compile(open(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec')) + def is_wheel(self): + return self.link and self.link.is_wheel + +- def move_wheel_files(self, wheeldir, root=None): ++ def move_wheel_files(self, wheeldir, root=None, strip_file_prefix=None): + move_wheel_files( + self.name, self.req, wheeldir, + user=self.use_user_site, + home=self.target_dir, + root=root, + 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 fa3e270..3a366d0 100644 +--- a/pip/wheel.py ++++ b/pip/wheel.py +@@ -136,7 +136,7 @@ def get_entrypoints(filename): + + + def move_wheel_files(name, req, wheeldir, user=False, home=None, root=None, +- pycompile=True, scheme=None, isolated=False): ++ pycompile=True, scheme=None, isolated=False, strip_file_prefix=None): + """Install a wheel""" + + if not scheme: +@@ -357,6 +357,8 @@ if __name__ == '__main__': + writer.writerow(row) + for f in generated: + h, l = rehash(f) ++ if strip_file_prefix and f.startswith(strip_file_prefix): ++ f = os.path.join(os.sep, os.path.relpath(f, strip_file_prefix)) + writer.writerow((f, h, l)) + for f in installed: + writer.writerow((installed[f], '', '')) diff --git a/SPECS/python-pip.spec b/SPECS/python-pip.spec new file mode 100644 index 0000000..199dabe --- /dev/null +++ b/SPECS/python-pip.spec @@ -0,0 +1,187 @@ +%{?scl:%scl_package python-setuptools} +%{!?scl:%global pkg_name %{name}} + +%if (! 0%{?rhel}) || 0%{?rhel} > 6 +%global build_wheel 1 +%endif +%if 0%{?rhel} && 0%{?rhel} < 6 +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} +%endif + +%global srcname pip +%if 0%{?build_wheel} +%global python3_wheelname %{srcname}-%{version}-py2.py3-none-any.whl +%endif + +Name: %{?scl_prefix}python-%{srcname} +Version: 7.1.0 +Release: 2%{?dist} +Summary: A tool for installing and managing Python packages + +Group: Development/Libraries +License: MIT +URL: http://www.pip-installer.org +Source0: http://pypi.python.org/packages/source/p/pip/%{srcname}-%{version}.tar.gz +Patch0: allow-stripping-prefix.patch + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildArch: noarch +BuildRequires: %{?scl_prefix}python-devel +BuildRequires: %{?scl_prefix}python-setuptools +%if 0%{?build_wheel} +BuildRequires: %{?scl_prefix}python-pip +BuildRequires: %{?scl_prefix}python-wheel +%endif +Requires: %{?scl_prefix}python-setuptools + +%description +Pip is a replacement for `easy_install +`_. It uses mostly the +same techniques for finding packages, so packages that were made +easy_installable should be pip-installable as well. + + +%prep +%{?scl:scl enable %{scl} - << \EOF} +%setup -q -n %{srcname}-%{version} + +%patch0 -p1 + +%{__sed} -i '1d' pip/__init__.py +%{?scl:EOF} + + +%build +%{?scl:scl enable %{scl} - << \EOF} +%if 0%{?build_wheel} +%{__python3} setup.py bdist_wheel +%else +%{__python3} setup.py build +%endif +%{?scl:EOF} + + +%install +%{__rm} -rf %{buildroot} + +%{?scl:scl enable %{scl} - << \EOF} +%if 0%{?build_wheel} +pip3 install -I dist/%{python3_wheelname} --root %{buildroot} --strip-file-prefix %{buildroot} +%else +%{__python3} setup.py install --skip-build --root %{buildroot} +%endif +%{?scl:EOF} + + +%clean +%{__rm} -rf %{buildroot} + +# unfortunately, pip's test suite requires virtualenv >= 1.6 which isn't in +# fedora yet. Once it is, check can be implemented + +%files +%defattr(-,root,root,-) +%doc LICENSE.txt README.rst docs +%attr(755,root,root) %{_bindir}/pip +%attr(755,root,root) %{_bindir}/pip3* +%{python3_sitelib}/pip* + +%changelog +* Sat Feb 13 2016 Robert Kuska - 7.1.0-2 +- Rebuilt with rewheel + +* Sat Feb 13 2016 Robert Kuska - 7.1.0-1 +- Rebuilt for rh-python35 + +* Mon Jan 19 2015 Matej Stuchlik - 1.5.6-4 +- Rebuild as wheel + +* Tue Nov 18 2014 Matej Stuchlik - 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 - 1.5.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sun May 25 2014 Matej Stuchlik - 1.5.6-1 +- Update to 1.5.6 + +* Fri Apr 25 2014 Matej Stuchlik - 1.5.4-4 +- Rebuild as wheel for Python 3.4 + +* Thu Apr 24 2014 Matej Stuchlik - 1.5.4-3 +- Disable build_wheel + +* Thu Apr 24 2014 Matej Stuchlik - 1.5.4-2 +- Rebuild as wheel for Python 3.4 + +* Mon Apr 07 2014 Matej Stuchlik - 1.5.4-1 +- Updated to 1.5.4 + +* Mon Oct 14 2013 Tim Flink - 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 - 1.3.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Tue Jul 16 2013 Toshio Kuratomi - 1.3.1-4 +- Fix for CVE 2013-2099 + +* Thu May 23 2013 Tim Flink - 1.3.1-3 +- undo python2 executable rename to python-pip. fixes #958377 +- fix summary to match upstream + +* Mon May 06 2013 Kevin Kofler - 1.3.1-2 +- Fix main package Summary, it's for Python 2, not 3 (#877401) + +* Fri Apr 26 2013 Jon Ciesla - 1.3.1-1 +- Update to 1.3.1, fix for CVE-2013-1888. + +* Thu Feb 14 2013 Fedora Release Engineering - 1.2.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Tue Oct 09 2012 Tim Flink - 1.2.1-2 +- Fixing files for python3-pip + +* Thu Oct 04 2012 Tim Flink - 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 - 1.1.0-1 +- Update to upstream 1.1.0 + +* Sat Jan 14 2012 Fedora Release Engineering - 1.0.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Sat Oct 22 2011 Tim Flink - 1.0.2-1 +- update to 1.0.2 and added python3 subpackage + +* Wed Jun 22 2011 Tim Flink - 0.8.3-1 +- update to 0.8.3 and project home page + +* Tue Feb 08 2011 Fedora Release Engineering - 0.8.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Mon Dec 20 2010 Luke Macken - 0.8.2-1 +- update to 0.8.2 of pip +* Mon Aug 30 2010 Peter Halliday - 0.8-1 +- update to 0.8 of pip +* Thu Jul 22 2010 David Malcolm - 0.7.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild + +* Wed Jul 7 2010 Peter Halliday - 0.7.2-1 +- update to 0.7.2 of pip +* Sun May 23 2010 Peter Halliday - 0.7.1-1 +- update to 0.7.1 of pip +* Fri Jan 1 2010 Peter Halliday - 0.6.1.4 +- fix dependency issue +* Fri Dec 18 2009 Peter Halliday - 0.6.1-2 +- fix spec file +* Thu Dec 17 2009 Peter Halliday - 0.6.1-1 +- upgrade to 0.6.1 of pip +* Mon Aug 31 2009 Peter Halliday - 0.4-1 +- Initial package +