|
@@ -2,7 +2,7 @@
|
|
|
|
|
|
Name: python-setuptools
|
|
|
Version: 5.4.2
|
|
|
-Release: 1%{?_dist_release}
|
|
|
+Release: 2%{?_dist_release}
|
|
|
Summary: Download, build, install, upgrade, and uninstall Python packages
|
|
|
Summary(ja): Python パッケージのダウンロード、ビルド、インストール、アップグレードおよびアンインストール用ツール
|
|
|
Group: Development/Tools
|
|
@@ -13,6 +13,7 @@ Source1: psfl.txt
|
|
|
Source2: zpl.txt
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
|
|
|
|
+Requires(post): alternatives
|
|
|
BuildArch: noarch
|
|
|
BuildRequires: python-devel
|
|
|
|
|
@@ -45,19 +46,36 @@ rm -rf $RPM_BUILD_ROOT
|
|
|
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
|
|
|
|
|
|
%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
|
|
|
|
|
|
%files
|
|
|
%defattr(-,root,root,-)
|
|
|
%doc *.txt
|
|
|
-%{_bindir}/*
|
|
|
+%{_bindir}/easy_install-%{python_version}
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
+* 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
|
|
|
|