Browse Source

new: python3-setuptools

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

+ 15 - 15
p/python3-setuptools/python-setuptools-vl.spec → p/python3-setuptools/python3-setuptools-vl.spec

@@ -1,8 +1,9 @@
-%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
+%{!?python3_version: %define python3_version %(python3 -c "import sys; sys.stdout.write(sys.version[:3])")}
 
-Name:           python-setuptools
+Name:           python3-setuptools
 Version:        5.4.2
-Release:        2%{?_dist_release}
+Release:        1%{?_dist_release}
 Summary:        Download, build, install, upgrade, and uninstall Python packages
 Summary(ja):     Python パッケージのダウンロード、ビルド、インストール、アップグレードおよびアンインストール用ツール
 Group:          Development/Tools
@@ -15,7 +16,7 @@ BuildRoot:      %{_tmppath}/%{name}-%{version}-root
 
 Requires(post): alternatives
 BuildArch:      noarch
-BuildRequires:  python-devel
+BuildRequires:  python3-devel
 
 %description
 setuptools is a collection of enhancements to the Python distutils that allow
@@ -31,20 +32,19 @@ setuptools は Python distutils の拡張機能を集めたツールです。
 
 %prep
 %setup -q -n setuptools-%{version}
-#find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python}|'
 
 
 %build
-CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
+CFLAGS="$RPM_OPT_FLAGS" python3 setup.py build
 
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%{__python} setup.py install -O1 --skip-build \
+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%{python_sitelib} -name '*.exe' | xargs rm -f
+find $RPM_BUILD_ROOT%{python3_sitelib} -name '*.exe' | xargs rm -f
 
 # for alternatives
 %__rm -f $RPM_BUILD_ROOT%{_bindir}/easy_install
@@ -54,25 +54,25 @@ 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
+	                      %{_bindir}/easy_install-%{python3_version} 20
 
 %preun
 if [ "$1" = "0" ]
 then
-  update-alternatives --remove easy_install %{_bindir}/easy_install-%{python_version}
+  update-alternatives --remove easy_install %{_bindir}/easy_install-%{python3_version}
 fi
 
 %files
 %defattr(-,root,root,-)
 %doc *.txt
-%{_bindir}/easy_install-%{python_version}
-%{python_sitelib}/*
+%{_bindir}/easy_install-%{python3_version}
+%{python3_sitelib}/*
 
 
 %changelog
+* Mon Mar  9 2015 IWAI, Masaharu <iwaim.sub@gmail.com> 5.4.2-1
+- new package python3-setuptools: based python-setuptools
+
 * Mon Mar  9 2015 IWAI, Masaharu <iwaim.sub@gmail.com> - 5.4.2-2
 - alternatives for easy_install