Matej Stuchlik ce1bf68
# This controls whether setuptools is build as a wheel or not,
Matej Stuchlik ce1bf68
# simplifying Python 3.4 bootstraping process
6eb82a3
%global build_wheel 0
e1be309
3fa6764
%global srcname setuptools
Matej Stuchlik ce1bf68
%if 0%{?build_wheel}
6eb82a3
%global python3_wheelname %{srcname}-%{version}-py2.py3-none-any.whl
6eb82a3
%global python3_record %{python35_sitelib}/%{srcname}-%{version}.dist-info/RECORD
Matej Stuchlik ce1bf68
%endif
9eb4e2d
6eb82a3
Name:           python35-setuptools
b3dd72b
Version:        2.0
6eb82a3
Release:        5%{?dist}
6eb82a3
Summary:        Easily build and distribute Python 3 packages
9eb4e2d
6f21ed3
Group:          Applications/System
6f21ed3
License:        Python or ZPLv2.0
e1be309
URL:            http://pypi.python.org/pypi/%{srcname}
3fa6764
Source0:        http://pypi.python.org/packages/source/s/%{srcname}/%{srcname}-%{version}.tar.gz
af65ae5
Source1:        psfl.txt
af65ae5
Source2:        zpl.txt
8a178e8
9eb4e2d
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
9eb4e2d
9eb4e2d
BuildArch:      noarch
6dfb759
# Require this so that we use a system copy of the match_hostname() function
6eb82a3
BuildRequires:  python35-devel
Matej Stuchlik ce1bf68
%if 0%{?build_wheel}
6eb82a3
BuildRequires:  python35-pip
6eb82a3
BuildRequires:  python35-wheel
Matej Stuchlik ce1bf68
%endif
c8db69c
# For unittests
c8db69c
BuildRequires: subversion
9eb4e2d
6f21ed3
%description
41b54b7
Setuptools is a collection of enhancements to the Python 3 distutils that allow
41b54b7
you to more easily build and distribute Python 3 packages, especially ones that
41b54b7
have dependencies on other packages.
41b54b7
c8db69c
This package also contains the runtime components of setuptools, necessary to
41b54b7
execute the software that requires pkg_resources.py.
957130b
9eb4e2d
%prep
e1be309
%setup -q -n %{srcname}-%{version}
62f00c4
3fa6764
find -name '*.txt' -exec chmod -x \{\} \;
1983a88
find . -name '*.orig' -exec rm \{\} \;
5cd637b
3fa6764
for file in setuptools/command/easy_install.py ; do
6eb82a3
    sed -i '1s|^#!python|#!%{__python35}|' $file
9d6978a
done
9eb4e2d
9eb4e2d
%build
Matej Stuchlik ce1bf68
%if 0%{?build_wheel}
6eb82a3
%{__python35} setup.py bdist_wheel
Matej Stuchlik ce1bf68
%else
6eb82a3
CFLAGS="$RPM_OPT_FLAGS" %{__python35} setup.py build
Matej Stuchlik ce1bf68
%endif
5cd637b
41b54b7
%install
41b54b7
rm -rf %{buildroot}
6f21ed3
Matej Stuchlik ce1bf68
%if 0%{?build_wheel}
Matej Stuchlik ce1bf68
pip3 install -I dist/%{python3_wheelname} --root %{buildroot} --strip-file-prefix %{buildroot}
Matej Stuchlik ce1bf68
Matej Stuchlik ce1bf68
# TODO: we have to remove this by hand now, but it'd be nice if we wouldn't have to
Matej Stuchlik ce1bf68
# (pip install wheel doesn't overwrite)
Matej Stuchlik ce1bf68
rm %{buildroot}%{_bindir}/easy_install
Matej Stuchlik ce1bf68
Matej Stuchlik ce1bf68
sed -i '/\/usr\/bin\/easy_install,/d' %{buildroot}%{python3_record}
Matej Stuchlik ce1bf68
%else
6eb82a3
%{__python35} setup.py install --skip-build --root %{buildroot}
Matej Stuchlik ce1bf68
%endif
41b54b7
6eb82a3
rm -rf %{buildroot}%{python35_sitelib}/setuptools/tests
Matej Stuchlik ce1bf68
%if 0%{?build_wheel}
Matej Stuchlik ce1bf68
sed -i '/^setuptools\/tests\//d' %{buildroot}%{python3_record}
Matej Stuchlik ce1bf68
%endif
41b54b7
41b54b7
install -p -m 0644 %{SOURCE1} %{SOURCE2} %{py3dir}
6eb82a3
find %{buildroot}%{python35_sitelib} -name '*.exe' | xargs rm -f
6eb82a3
chmod +x %{buildroot}%{python35_sitelib}/setuptools/command/easy_install.py
41b54b7
41b54b7
%check
6eb82a3
%{__python35} setup.py test
9eb4e2d
9eb4e2d
%clean
29bf732
rm -rf %{buildroot}
9eb4e2d
5cd637b
9eb4e2d
%files
9eb4e2d
%defattr(-,root,root,-)
41b54b7
%doc psfl.txt zpl.txt docs
6eb82a3
%{python35_sitelib}/*
12348a2
%{_bindir}/easy_install-3.*
9eb4e2d
9eb4e2d
%changelog
6eb82a3
* Sat Jun 07 2014 Miro HronĨok <mhroncok@redhat.com> - 2.0-5
6eb82a3
- Keep this only for Python 3.5
6eb82a3
Matej Stuchlik 68adb7b
* Fri Apr 25 2014 Matej Stuchlik <mstuchli@redhat.com> - 2.0-4
Matej Stuchlik 68adb7b
- Rebuild as wheel for Python 3.4
Matej Stuchlik 68adb7b
b03ea8d
* Thu Apr 24 2014 Tomas Radej <tradej@redhat.com> - 2.0-3
b03ea8d
- Rebuilt for tag f21-python
b03ea8d
Matej Stuchlik ce1bf68
* Wed Apr 23 2014 Matej Stuchlik <mstuchli@redhat.com> - 2.0-2
Matej Stuchlik ce1bf68
- Add a switch to build setuptools as wheel
Matej Stuchlik ce1bf68
b3dd72b
* Mon Dec  9 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 2.0-1
b3dd72b
- Update to new upstream release with a few things removed from the API:
b3dd72b
  Changelog: https://pypi.python.org/pypi/setuptools#id139
b3dd72b
db6ebee
* Mon Nov 18 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 1.4-1
db6ebee
- Update to 1.4 that gives easy_install pypi credential handling
db6ebee
8b4da0d
* Thu Nov  7 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 1.3.1-1
8b4da0d
- Minor upstream update to reign in overzealous warnings
8b4da0d
c8db69c
* Mon Nov  4 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 1.3-1
c8db69c
- Upstream update that pulls in our security patches
c8db69c
6dfb759
* Mon Oct 28 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 1.1.7-1
6dfb759
- Update to newer upstream release that has our patch to the unittests
6dfb759
- Fix for http://bugs.python.org/issue17997#msg194950 which affects us since
6dfb759
  setuptools copies that code. Changed to use
6dfb759
  python-backports-ssl_match_hostname so that future issues can be fixed in
6dfb759
  that package.
6dfb759
306cac0
* Sat Oct 26 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 1.1.6-1
306cac0
- Update to newer upstream release.  Some minor incompatibilities listed but
306cac0
  they should affect few, if any consumers.
306cac0
c9dde15
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6-2
c9dde15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
c9dde15
994ec72
* Tue Jul 23 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 0.9.6-1
994ec72
- Upstream update -- just fixes python-2.4 compat
994ec72
28aeb2e
* Tue Jul 16 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 0.9.5-1
28aeb2e
- Update to 0.9.5
28aeb2e
  - package_index can handle hashes other than md5
28aeb2e
  - Fix security vulnerability in SSL certificate validation
28aeb2e
  - https://bugzilla.redhat.com/show_bug.cgi?id=963260
28aeb2e
23d2121
* Fri Jul  5 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 0.8-1
23d2121
- Update to upstream 0.8  release.  Codebase now runs on anything from
23d2121
  python-2.4 to python-3.3 without having to be translated by 2to3.
23d2121
3fa6764
* Wed Jul  3 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 0.7.7-1
3fa6764
- Update to 0.7.7 upstream release
3fa6764
3fa6764
* Mon Jun 10 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 0.7.2-2
3fa6764
- Update to the setuptools-0.7 branch that merges distribute and setuptools
3fa6764
895ce1e
* Thu Apr 11 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.36-1
895ce1e
- Update to upstream 0.6.36.  Many bugfixes
895ce1e
0c781ab
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.28-4
0c781ab
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
0c781ab
c72fb46
* Fri Aug 03 2012 David Malcolm <dmalcolm@redhat.com> - 0.6.28-3
c72fb46
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
c72fb46
f450465
* Fri Aug  3 2012 David Malcolm <dmalcolm@redhat.com> - 0.6.28-2
f450465
- remove rhel logic from with_python3 conditional
895ce1e
a4d5040
* Mon Jul 23 2012 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.28-1
a4d5040
- New upstream release:
a4d5040
  - python-3.3 fixes
a4d5040
  - honor umask when setuptools is used to install other modules
a4d5040
a064d3c
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.27-3
a064d3c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
a064d3c
0ef78f7
* Mon Jun 11 2012 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.27-2
0ef78f7
- Fix easy_install.py having a python3 shebang in the python2 package
0ef78f7
8a178e8
* Thu Jun  7 2012 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.27-1
8a178e8
- Upstream bugfix
8a178e8
0d1fa92
* Tue May 15 2012 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.24-2
0d1fa92
- Upstream bugfix
0d1fa92
899a186
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.24-2
899a186
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
899a186
2f152e5
* Mon Oct 17 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.24-1
2f152e5
- Upstream bugfix
2f152e5
- Compile the win32 launcher binary using mingw
2f152e5
2f152e5
* Sun Aug 21 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.21-1
efecd02
- Upstream bugfix release
efecd02
2f152e5
* Thu Jul 14 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.19-1
ab8f0e6
- Upstream bugfix release
ab8f0e6
8e9734f
* Tue Feb 22 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.14-7
8e9734f
- Switch to patch that I got in to upstream
8e9734f
d9f5a2d
* Tue Feb 22 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.14-6
4649b90
- Fix build on python-3.2
4649b90
1caf2b4
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.14-5
1caf2b4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
1caf2b4
50fa7ba
* Sun Aug 22 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.6.14-4
50fa7ba
- rebuild with python3.2
50fa7ba
  http://lists.fedoraproject.org/pipermail/devel/2010-August/141368.html
50fa7ba
957130b
* Tue Aug 10 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.14-3
957130b
- Update description to mention this is distribute
957130b
ccbd844
* Thu Jul 22 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.6.14-2
ccbd844
- bump for building against python 2.7
ccbd844
dc62950
* Thu Jul 22 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.6.14-1
dc62950
- update to new version
dc62950
- all patches are upsteam
dc62950
12348a2
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.6.13-7
12348a2
- generalize path of easy_install-2.6 and -3.1 to -2.* and -3.*
12348a2
cfc2baf
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.6.13-6
cfc2baf
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
cfc2baf
1983a88
* Sat Jul 3 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.13-5
1983a88
- Upstream patch for compatibility problem with setuptools
1983a88
- Minor spec cleanups
1983a88
- Provide python-distribute for those who see an import distribute and need
1983a88
  to get the proper package.
1983a88
0b8aaaa
* Thu Jun 10 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.13-4
0b8aaaa
- Fix race condition in unittests under the python-2.6.x on F-14.
0b8aaaa
29bf732
* Thu Jun 10 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.13-3
29bf732
- Fix few more buildroot macros
29bf732
62f00c4
* Thu Jun 10 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.13-2
62f00c4
- Include data that's needed for running tests
62f00c4
777077a
* Thu Jun 10 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.13-1
777077a
- Update to upstream 0.6.13
777077a
- Minor specfile formatting fixes
777077a
41002be
* Thu Feb 04 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.10-3
41002be
- First build with python3 support enabled.
41002be
  
6dfb759
* Fri Jan 29 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.10-2
a3c3519
- Really disable the python3 portion
a3c3519
6dfb759
* Fri Jan 29 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.10-1
41b54b7
- Update the python3 portions but disable for now.
41b54b7
- Update to 0.6.10
41b54b7
- Remove %%pre scriptlet as the file has a different name than the old
41b54b7
  package's directory
41b54b7
41b54b7
* Tue Jan 26 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.9-4
41b54b7
- Fix install to make /usr/bin/easy_install the py2 version
41b54b7
- Don't need python3-tools since the library is now in the python3 package
41b54b7
- Few other changes to cleanup style
41b54b7
6dfb759
* Fri Jan 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.6.9-2
41b54b7
- add python3 subpackage
41b54b7
6e1ff0c
* Mon Dec 14 2009 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.9-1
6e1ff0c
- New upstream bugfix release.
6e1ff0c
ab5df01
* Sun Dec 13 2009 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.8-2
ab5df01
- Test rebuild
ab5df01
42e5fe4
* Mon Nov 16 2009 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.8-1
42e5fe4
- Update to 0.6.8.
42e5fe4
- Fix directory => file transition when updating from setuptools-0.6c9.
42e5fe4
becc145
* Tue Nov 3 2009 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.7-2
becc145
- Fix duplicate inclusion of files.
becc145
- Only Obsolete old versions of python-setuptools-devel
becc145
16cfaec
* Tue Nov 3 2009 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.7-1
16cfaec
- Move easy_install back into the main package as the needed files have been
16cfaec
  moved from python-devel to the main python package.
16cfaec
- Update to 0.6.7 bugfix.
16cfaec
875dd74
* Fri Oct 16 2009 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.6-1
875dd74
- Upstream bugfix release.
875dd74
e1be309
* Mon Oct 12 2009 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.4-1
e1be309
- First build from the distribute codebase -- distribute-0.6.4.
e1be309
- Remove svn patch as upstream has chosen to go with an easier change for now.
e1be309
03aa0df
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6c9-5
03aa0df
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
03aa0df
66503d5
* Tue Jul 14 2009 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.6c9-4
66503d5
- Apply SVN-1.6 versioning patch (rhbz #511021)
66503d5
6a010e7
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6c9-3
6a010e7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild