Blame SPECS/python-setuptools.spec

ccf04c
%{?scl:%scl_package python-setuptools}
ccf04c
%{!?scl:%global pkg_name %{name}}
ccf04c
ccf04c
%global srcname setuptools
ccf04c
%global build_wheel 1
ccf04c
# We don't ship pytest nor mock with scls so we don't run the test suite
ccf04c
%global with_check 0
ccf04c
ccf04c
%if 0%{?build_wheel}
ccf04c
%global python3_wheelname %{srcname}-%{version}-py2.py3-none-any.whl
ccf04c
%global python3_record %{python3_sitelib}/%{srcname}-%{version}.dist-info/RECORD
ccf04c
%endif
ccf04c
ccf04c
ccf04c
Name:           %{?scl_prefix}python-setuptools
ccf04c
Version:        18.0.1
ccf04c
Release:        2%{?dist}
ccf04c
Summary:        Easily build and distribute Python packages
ccf04c
ccf04c
Group:          Applications/System
ccf04c
License:        Python or ZPLv2.0
ccf04c
URL:            http://pypi.python.org/pypi/%{srcname}
ccf04c
Source0:        http://pypi.python.org/packages/source/d/%{srcname}/%{srcname}-%{version}.tar.gz
ccf04c
Source1:        psfl.txt
ccf04c
Source2:        zpl.txt
ccf04c
ccf04c
BuildRoot:      %{_tmppath}/%{pkg_name}-%{version}-%{release}-root-%(%{__id_u} -n)
ccf04c
ccf04c
BuildArch:      noarch
ccf04c
ccf04c
BuildRequires:  %{?scl_prefix}python-devel
ccf04c
ccf04c
%if 0%{?build_wheel}
ccf04c
BuildRequires:  %{?scl_prefix}python-pip
ccf04c
BuildRequires:  %{?scl_prefix}python-wheel
ccf04c
%endif
ccf04c
ccf04c
%if 0%{?with_check}
ccf04c
BuildRequires:  %{?scl_prefix}python-pytest
ccf04c
BuildRequires:  %{?scl_prefix}python-mock
ccf04c
%endif
ccf04c
ccf04c
ccf04c
# Legacy: We removed this subpackage once easy_install no longer depended on
ccf04c
# python-devel
ccf04c
Provides: %{?scl_prefix}python-setuptools-devel = %{version}-%{release}
ccf04c
Obsoletes: %{?scl_prefix}python-setuptools-devel < 0.6.7-1
ccf04c
ccf04c
# Provide this since some people will request distribute by name
ccf04c
Provides: %{?scl_prefix}python-distribute = %{version}-%{release}
ccf04c
ccf04c
%description
ccf04c
Setuptools is a collection of enhancements to the Python distutils that allow
ccf04c
you to more easily build and distribute Python packages, especially ones that
ccf04c
have dependencies on other packages.
ccf04c
ccf04c
This package contains the runtime components of setuptools, necessary to
ccf04c
execute the software that requires pkg_resources.py.
ccf04c
ccf04c
This package contains the distribute fork of setuptools.
ccf04c
ccf04c
%prep
ccf04c
%setup -q -n %{srcname}-%{version}
ccf04c
ccf04c
rm -f setuptools/*.exe
ccf04c
ccf04c
find -name '*.txt' -exec chmod -x \{\} \;
ccf04c
find . -name '*.orig' -exec rm \{\} \;
ccf04c
ccf04c
rm setuptools/tests/test_integration.py
ccf04c
ccf04c
for file in setuptools/command/easy_install.py ; do
ccf04c
    sed -i '1s|^#!python|#!%{__python3}|' $file
ccf04c
done
ccf04c
ccf04c
%build
ccf04c
%{?scl:scl enable %{scl} - << \EOF}
ccf04c
%if 0%{?build_wheel}
ccf04c
%{__python} setup.py bdist_wheel
ccf04c
%else
ccf04c
CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
ccf04c
%endif
ccf04c
%{?scl:EOF}
ccf04c
ccf04c
%install
ccf04c
rm -rf %{buildroot}
ccf04c
ccf04c
%if 0%{?build_wheel}
ccf04c
%{?scl:scl enable %{scl} "}
ccf04c
pip3 install -I dist/%{python3_wheelname} --root %{buildroot} --strip-file-prefix %{buildroot}
ccf04c
%{?scl:"}
ccf04c
ccf04c
# TODO: we have to remove this by hand now, but it'd be nice if we wouldn't have to
ccf04c
# (pip install wheel doesn't overwrite)
ccf04c
rm %{buildroot}%{_bindir}/easy_install
ccf04c
ccf04c
sed -i '/\/usr\/bin\/easy_install,/d' %{buildroot}%{python3_record}
ccf04c
%else
ccf04c
ccf04c
%{?scl:scl enable %{scl} "}
ccf04c
%{__python3} setup.py install --skip-build --root %{buildroot}
ccf04c
%{?scl:"}
ccf04c
%endif
ccf04c
ccf04c
#rm -rf %{buildroot}%{python3_sitelib}/setuptools/tests
ccf04c
ccf04c
%if 0%{?build_wheel}
ccf04c
sed -i '/^setuptools\/tests\//d' %{buildroot}%{python3_record}
ccf04c
cp %{buildroot}%{_bindir}/easy_install-3.5 %{buildroot}%{_bindir}/easy_install
ccf04c
%endif
ccf04c
ccf04c
install -p -m 0644 %{SOURCE1} %{SOURCE2} .
ccf04c
find %{buildroot}%{python3_sitelib} -name '*.exe' | xargs rm -f
ccf04c
chmod +x %{buildroot}%{python3_sitelib}/setuptools/command/easy_install.py
ccf04c
ccf04c
%check
ccf04c
ccf04c
%if 0%{?with_check}
ccf04c
%{?scl:scl enable %{scl} "}
ccf04c
LANG=en_GB.utf8 LC_ALL=en_GB.utf8 py.test
ccf04c
%{?scl:"}
ccf04c
%endif
ccf04c
ccf04c
%clean
ccf04c
rm -rf %{buildroot}
ccf04c
ccf04c
ccf04c
%files
ccf04c
%defattr(-,root,root,-)
ccf04c
%doc psfl.txt zpl.txt docs
ccf04c
%{python3_sitelib}/*
ccf04c
%{_bindir}/easy_install
ccf04c
%{_bindir}/easy_install-3.*
ccf04c
ccf04c
%changelog
ccf04c
* Sat Feb 13 2016 Robert Kuska <rkuska@redhat.com> - 18.0.1-2
ccf04c
- Rebuild with rewheel
ccf04c
ccf04c
* Sat Feb 13 2016 Robert Kuska <rkuska@redhat.com> - 7.1.0-1
ccf04c
- Update to 7.1.0 and rebuild for rh-python35
ccf04c
ccf04c
* Mon Jan 19 2015 Matej Stuchlik <mstuchli@redhat.com> - 11.3.1-2
ccf04c
- Rebuild as wheel
ccf04c
ccf04c
* Mon Jan 19 2015 Robert Kuska <rkuska@redhat.com> - 7.0-1
ccf04c
- Update to 11.3.1
ccf04c
ccf04c
* Thu Jan 15 2015 Robert Kuska <rkuska@redhat.com> - 7.0-1
ccf04c
- Update to 7.0
ccf04c
- build with build_wheel set to 0
ccf04c
ccf04c
* Fri Nov 15 2013 Robert Kuska <rkuska@redhat.com> - 0.9.8-3
ccf04c
- Increase release number by 2 to avoid conflict with rhel-7.0 build
ccf04c
ccf04c
* Fri Nov 15 2013 Robert Kuska <rkuska@redhat.com> - 0.9.8-1
ccf04c
- Update to 0.9.8
ccf04c
ccf04c
* Tue Aug 20 2013 Robert Kuska <rkuska@redhat.com> - 0.6.28-7
ccf04c
- Add SSL to easy_install resolves CVE-2013-1633 and CVE-2013-2099 
ccf04c
- For more info related to these CVEs visit rhbz#994182
ccf04c
Resolves: rhbz#996706
ccf04c
ccf04c
* Mon May 20 2013 Robert Kuska <rkuska@redhat.com> - 0.6.28-6
ccf04c
- Fix rhbz #963675
ccf04c
ccf04c
* Thu May 09 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 0.6.28-5
ccf04c
- Rebuild to generate bytecode properly after fixing rhbz#956289
ccf04c
ccf04c
* Wed Jan 09 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 0.6.28-4
ccf04c
- Rebuilt for SCL.
ccf04c
ccf04c
* Fri Aug 03 2012 David Malcolm <dmalcolm@redhat.com> - 0.6.28-3
ccf04c
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
ccf04c
ccf04c
* Fri Aug  3 2012 David Malcolm <dmalcolm@redhat.com> - 0.6.28-2
ccf04c
- remove rhel logic from with_python3 conditional
ccf04c
ccf04c
* Mon Jul 23 2012 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.28-1
ccf04c
- New upstream release:
ccf04c
  - python-3.3 fixes
ccf04c
  - honor umask when setuptools is used to install other modules
ccf04c
ccf04c
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.27-3
ccf04c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
ccf04c
ccf04c
* Mon Jun 11 2012 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.27-2
ccf04c
- Fix easy_install.py having a python3 shebang in the python2 package
ccf04c
ccf04c
* Thu Jun  7 2012 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.27-1
ccf04c
- Upstream bugfix
ccf04c
ccf04c
* Tue May 15 2012 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.24-2
ccf04c
- Upstream bugfix
ccf04c
ccf04c
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.24-2
ccf04c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
ccf04c
ccf04c
* Mon Oct 17 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.24-1
ccf04c
- Upstream bugfix
ccf04c
- Compile the win32 launcher binary using mingw
ccf04c
ccf04c
* Sun Aug 21 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.21-1
ccf04c
- Upstream bugfix release
ccf04c
ccf04c
* Thu Jul 14 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.19-1
ccf04c
- Upstream bugfix release
ccf04c
ccf04c
* Tue Feb 22 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.14-7
ccf04c
- Switch to patch that I got in to upstream
ccf04c
ccf04c
* Tue Feb 22 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.14-6
ccf04c
- Fix build on python-3.2
ccf04c
ccf04c
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.14-5
ccf04c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
ccf04c
ccf04c
* Sun Aug 22 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.6.14-4
ccf04c
- rebuild with python3.2
ccf04c
  http://lists.fedoraproject.org/pipermail/devel/2010-August/141368.html
ccf04c
ccf04c
* Tue Aug 10 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.14-3
ccf04c
- Update description to mention this is distribute
ccf04c
ccf04c
* Thu Jul 22 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.6.14-2
ccf04c
- bump for building against python 2.7
ccf04c
ccf04c
* Thu Jul 22 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.6.14-1
ccf04c
- update to new version
ccf04c
- all patches are upsteam
ccf04c
ccf04c
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.6.13-7
ccf04c
- generalize path of easy_install-2.6 and -3.1 to -2.* and -3.*
ccf04c
ccf04c
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.6.13-6
ccf04c
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
ccf04c
ccf04c
* Sat Jul 3 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.13-5
ccf04c
- Upstream patch for compatibility problem with setuptools
ccf04c
- Minor spec cleanups
ccf04c
- Provide python-distribute for those who see an import distribute and need
ccf04c
  to get the proper package.
ccf04c
ccf04c
* Thu Jun 10 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.13-4
ccf04c
- Fix race condition in unittests under the python-2.6.x on F-14.
ccf04c
ccf04c
* Thu Jun 10 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.13-3
ccf04c
- Fix few more buildroot macros
ccf04c
ccf04c
* Thu Jun 10 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.13-2
ccf04c
- Include data that's needed for running tests
ccf04c
ccf04c
* Thu Jun 10 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.13-1
ccf04c
- Update to upstream 0.6.13
ccf04c
- Minor specfile formatting fixes
ccf04c
ccf04c
* Thu Feb 04 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.10-3
ccf04c
- First build with python3 support enabled.
ccf04c
  
ccf04c
* Fri Jan 29 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.10-2
ccf04c
- Really disable the python3 portion
ccf04c
ccf04c
* Fri Jan 29 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.10-1
ccf04c
- Update the python3 portions but disable for now.
ccf04c
- Update to 0.6.10
ccf04c
- Remove %%pre scriptlet as the file has a different name than the old
ccf04c
  package's directory
ccf04c
ccf04c
* Tue Jan 26 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.9-4
ccf04c
- Fix install to make /usr/bin/easy_install the py2 version
ccf04c
- Don't need python3-tools since the library is now in the python3 package
ccf04c
- Few other changes to cleanup style
ccf04c
ccf04c
* Fri Jan 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.6.9-2
ccf04c
- add python3 subpackage
ccf04c
ccf04c
* Mon Dec 14 2009 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.9-1
ccf04c
- New upstream bugfix release.
ccf04c
ccf04c
* Sun Dec 13 2009 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.8-2
ccf04c
- Test rebuild
ccf04c
ccf04c
* Mon Nov 16 2009 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.8-1
ccf04c
- Update to 0.6.8.
ccf04c
- Fix directory => file transition when updating from setuptools-0.6c9.
ccf04c
ccf04c
* Tue Nov 3 2009 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.7-2
ccf04c
- Fix duplicate inclusion of files.
ccf04c
- Only Obsolete old versions of python-setuptools-devel
ccf04c
ccf04c
* Tue Nov 3 2009 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.7-1
ccf04c
- Move easy_install back into the main package as the needed files have been
ccf04c
  moved from python-devel to the main python package.
ccf04c
- Update to 0.6.7 bugfix.
ccf04c
ccf04c
* Fri Oct 16 2009 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.6-1
ccf04c
- Upstream bugfix release.
ccf04c
ccf04c
* Mon Oct 12 2009 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.4-1
ccf04c
- First build from the distribute codebase -- distribute-0.6.4.
ccf04c
- Remove svn patch as upstream has chosen to go with an easier change for now.
ccf04c
ccf04c
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6c9-5
ccf04c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
ccf04c
ccf04c
* Tue Jul 14 2009 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.6c9-4
ccf04c
- Apply SVN-1.6 versioning patch (rhbz #511021)
ccf04c
ccf04c
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6c9-3
ccf04c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild