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