Browse Source

python-setuptools 5.4.2-2

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@9418 ec354946-7b23-47d6-9f5a-488ba84defc7
iwaim 9 years ago
parent
commit
84dfb8c8c8
1 changed files with 20 additions and 2 deletions
  1. 20 2
      p/python-setuptools/python-setuptools-vl.spec

+ 20 - 2
p/python-setuptools/python-setuptools-vl.spec

@@ -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