Modernized python macros (#1044444)

This commit is contained in:
Ralph Bean 2014-10-11 15:43:20 -04:00
parent e820e7af2d
commit 476c777001
3 changed files with 21 additions and 13 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@
/setuptools-1.3.1.tar.gz /setuptools-1.3.1.tar.gz
/setuptools-1.4.tar.gz /setuptools-1.4.tar.gz
/setuptools-2.0.tar.gz /setuptools-2.0.tar.gz
/setuptools-6.0.2.tar.gz

View File

@ -20,7 +20,7 @@
Name: python-setuptools Name: python-setuptools
Version: 6.0.2 Version: 6.0.2
Release: 1%{?dist} Release: 2%{?dist}
Summary: Easily build and distribute Python packages Summary: Easily build and distribute Python packages
Group: Applications/System Group: Applications/System
@ -88,6 +88,12 @@ execute the software that requires pkg_resources.py.
%prep %prep
%setup -q -n %{srcname}-%{version} %setup -q -n %{srcname}-%{version}
# Remove bundled egg-info
rm -rf *.egg*
# Remove bundled exes
rm -f setuptools/*.exe
find -name '*.txt' -exec chmod -x \{\} \; find -name '*.txt' -exec chmod -x \{\} \;
find . -name '*.orig' -exec rm \{\} \; find . -name '*.orig' -exec rm \{\} \;
@ -157,28 +163,24 @@ popd
%if 0%{?build_wheel} %if 0%{?build_wheel}
pip2 install -I dist/%{python2_wheelname} --root %{buildroot} --strip-file-prefix %{buildroot} pip2 install -I dist/%{python2_wheelname} --root %{buildroot} --strip-file-prefix %{buildroot}
%else %else
%{__python} setup.py install --skip-build --root %{buildroot} %{__python2} setup.py install --skip-build --root %{buildroot}
%endif %endif
rm -rf %{buildroot}%{python_sitelib}/setuptools/tests rm -rf %{buildroot}%{python2_sitelib}/setuptools/tests
%if 0%{?build_wheel} %if 0%{?build_wheel}
sed -i '/^setuptools\/tests\//d' %{buildroot}%{python2_record} sed -i '/^setuptools\/tests\//d' %{buildroot}%{python2_record}
%endif %endif
install -p -m 0644 %{SOURCE1} %{SOURCE2} . install -p -m 0644 %{SOURCE1} %{SOURCE2} .
find %{buildroot}%{python_sitelib} -name '*.exe' | xargs rm -f find %{buildroot}%{python2_sitelib} -name '*.exe' | xargs rm -f
chmod +x %{buildroot}%{python_sitelib}/setuptools/command/easy_install.py chmod +x %{buildroot}%{python2_sitelib}/setuptools/command/easy_install.py
%check %check
export LANG=en_GB.utf8 LANG=en_GB.utf8 LC_ALL=en_GB.utf8 %{__python2} setup.py test
export LC_ALL=en_GB.utf8
%{__python} setup.py test
%if 0%{?with_python3} %if 0%{?with_python3}
pushd %{py3dir} pushd %{py3dir}
export LANG=en_GB.utf8 LANG=en_GB.utf8 LC_ALL=en_GB.utf8 %{__python3} setup.py test
export LC_ALL=en_GB.utf8
%{__python3} setup.py test
popd popd
%endif # with_python3 %endif # with_python3
@ -189,7 +191,7 @@ rm -rf %{buildroot}
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc *.txt docs %doc *.txt docs
%{python_sitelib}/* %{python2_sitelib}/*
%{_bindir}/easy_install %{_bindir}/easy_install
%{_bindir}/easy_install-2.* %{_bindir}/easy_install-2.*
@ -202,6 +204,11 @@ rm -rf %{buildroot}
%endif # with_python3 %endif # with_python3
%changelog %changelog
* Sat Oct 11 2014 Ralph Bean <rbean@redhat.com> - 6.0.2-2
- Modernized python2 macros.
- Inlined locale environment variables in the %%check section.
- Remove bundled egg-info and .exes.
* Fri Oct 03 2014 Kevin Fenzi <kevin@scrye.com> 6.0.2-1 * Fri Oct 03 2014 Kevin Fenzi <kevin@scrye.com> 6.0.2-1
- Update to 6.0.2 - Update to 6.0.2

View File

@ -1 +1 @@
887cdf417bc5d25326c66bb98c0dd160 setuptools-2.0.tar.gz b79fab610e362fe8e3a9cb92fb9d95ef setuptools-6.0.2.tar.gz