123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234 |
- %bcond_without python3
- %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
- %if %{with python3}
- %{!?python3_sitelib: %global python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
- %{!?python3_version: %global python3_version %(python3 -c "import sys; sys.stdout.write(sys.version[:3])")}
- %endif
- Name: python-setuptools
- Version: 18.5
- Release: 3%{?_dist_release}
- Summary: Download, build, install, upgrade, and uninstall Python packages
- Summary(ja): Python パッケージのダウンロード、ビルド、インストール、アップグレードおよびアンインストール用ツール
- Group: Development/Tools
- License: PSFL/ZPL
- URL: https://pypi.python.org/pypi/setuptools
- Source0: https://pypi.python.org/packages/source/s/setuptools/setuptools-%{version}.tar.gz
- Source1: psfl.txt
- Source2: zpl.txt
- Patch0: add-setter-for-test_args.patch
- BuildRoot: %{_tmppath}/%{name}-%{version}-root
- Requires(post): alternatives
- BuildArch: noarch
- BuildRequires: python-devel
- %description
- setuptools is a collection of enhancements to the Python distutils that allow
- you to more easily build and distribute Python packages, especially ones that
- have dependencies on other packages.
- %description -l ja
- setuptools は Python distutils の拡張機能を集めたツールです。
- このツールにより Python パッケージの構築や配布が簡単に行えるように
- なります。特に他のパッケージに依存しているパッケージを扱う際に便利
- です。
- %if %{with python3}
- %package -n python3-setuptools
- Summary: Download, build, install, upgrade, and uninstall Python3 packages
- Summary(ja): Python3 パッケージのダウンロード、ビルド、インストール、アップグレードおよびアンインストール用ツール
- Group: Development/Tools
- BuildRequires: python3-devel
- Requires(post): alternatives
- %description -n python3-setuptools
- setuptools is a collection of enhancements to the Python distutils that allow
- you to more easily build and distribute Python packages, especially ones that
- have dependencies on other packages.
- %description -n python3-setuptools -l ja
- setuptools は Python distutils の拡張機能を集めたツールです。
- このツールにより Python パッケージの構築や配布が簡単に行えるように
- なります。特に他のパッケージに依存しているパッケージを扱う際に便利
- です。
- %endif
- %prep
- %setup -T -c -n setuptools-%{version}
- mkdir py2
- pushd py2
- tar xvf %{SOURCE0}
- pushd setuptools-%{version}
- %patch0 -p1
- #find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python}|'
- cp *.txt ../../
- popd
- popd
- %if %{with python3}
- cp -a py2 py3
- %endif
- %build
- pushd py2/setuptools-%{version}
- CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
- popd
- %if %{with python3}
- pushd py3/setuptools-%{version}
- CFLAGS="$RPM_OPT_FLAGS" python3 setup.py build
- popd
- %endif
- %install
- rm -rf $RPM_BUILD_ROOT
- pushd py2/setuptools-%{version}
- %{__python} setup.py install -O1 --skip-build \
- --root $RPM_BUILD_ROOT \
- --single-version-externally-managed
- install -p -m 0644 %{SOURCE1} %{SOURCE2} .
- find $RPM_BUILD_ROOT%{python_sitelib} -name '*.exe' | xargs rm -f
- # for alternatives
- %__rm -f $RPM_BUILD_ROOT%{_bindir}/easy_install
- popd
- %if %{with python3}
- pushd py3/setuptools-%{version}
- python3 setup.py install -O1 --skip-build \
- --root $RPM_BUILD_ROOT \
- --single-version-externally-managed
- install -p -m 0644 %{SOURCE1} %{SOURCE2} .
- find $RPM_BUILD_ROOT%{python3_sitelib} -name '*.exe' | xargs rm -f
- # for alternatives
- %__rm -f $RPM_BUILD_ROOT%{_bindir}/easy_install
- popd
- %endif
- %clean
- rm -rf $RPM_BUILD_ROOT
- %post
- update-alternatives --install %{_bindir}/easy_install easy_install \
- %{_bindir}/easy_install-%{python_version} 30
- %triggerpostun -- python-setuptools < 5.4.2-2
- update-alternatives --auto easy_install
- %preun
- if [ "$1" = "0" ]
- then
- update-alternatives --remove easy_install %{_bindir}/easy_install-%{python_version}
- fi
- %if %{with python3}
- %post -n python3-setuptools
- update-alternatives --install %{_bindir}/easy_install easy_install \
- %{_bindir}/easy_install-%{python3_version} 20
- %preun -n python3-setuptools
- if [ "$1" = "0" ]
- then
- update-alternatives --remove easy_install %{_bindir}/easy_install-%{python3_version}
- fi
- %endif
- %files
- %defattr(-,root,root,-)
- %doc *.txt
- %{_bindir}/easy_install-%{python_version}
- %{python_sitelib}/*
- %if %{with python3}
- %files -n python3-setuptools
- %defattr(-,root,root,-)
- %doc *.txt
- %{_bindir}/easy_install-%{python3_version}
- %{python3_sitelib}/*
- %endif
- %changelog
- * Tue Jun 28 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 18.5-3
- - rebuild with python3-3.5.2
- * Thu Dec 24 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 18.5-2
- - added a subpackage: python3-setuptools.
- * Sun Nov 15 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 18.5-1
- - new upstream release.
- - imported patch0 from rawhide.
- * Mon Mar 9 2015 IWAI, Masaharu <iwaim.sub@gmail.com> - 5.4.2-2
- - alternatives for easy_install
- * Fri Aug 08 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> 5.4.2-1
- - new upstream release
- * Sat Jul 26 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> 5.4.1-1
- - new upstream release
- * Sun Jul 06 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> 5.4-1
- - new upstream release
- * Sat Apr 26 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> 3.4.4-1
- - new upstream release
- * Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.6c11-2
- - rebuild with python-2.7.2
- * Tue Feb 02 2010 Shu KONNO <owa@bg.wakwak.com> 0.6c11-1
- - new upstream release
- * Tue Feb 02 2010 Shu KONNO <owa@bg.wakwak.com> 0.6c9-2
- - rebuild with python-2.6
- * Sun Dec 07 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.6c9-1
- - new upstream release
- - add japanese summary and description
- * Mon Jul 21 2008 Shu KONNO <owa@bg.wakwak.com> - 0.6c3-1vl5
- - rebuilt with python-2.5.2
- - applied new versioning policy
- * Sat Nov 25 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 0.6c3-1vl2
- - rebuilt for Vine Linux 4.0
- - changed Group to Development/Tools
- * Wed Nov 15 2006 Susumu Tanimura <stanimura-ngs@umin.ac.jp>
- - Refurbished for VineLinux3.2
- * Tue Sep 12 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.6c2-1
- - Upstream 0.6c2
- - Ghostbusting
- * Mon Jul 31 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.6c1-2
- - Set perms on license files (
- * Sat Jul 22 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.6c1-1
- - Version 0.6c1
- * Wed Jun 28 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.6b3-1
- - Taking over from Ignacio
- - Version 0.6b3
- - Ghost .pyo files in sitelib
- - Add license files
- - Remove manual python-abi, since we're building FC4 and up
- - Kill .exe files
- * Wed Feb 15 2006 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.6a10-1
- - Upstream update
- * Mon Jan 16 2006 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.6a9-1
- - Upstream update
- * Sat Dec 24 2005 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.6a8-1
- - Initial RPM release
|