| |
@@ -0,0 +1,38 @@
|
| |
+ %__python3_other /usr/bin/python3.6
|
| |
+
|
| |
+ %python3_other_sitelib %(%{__python3_other} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
|
| |
+ %python3_other_sitearch %(%{__python3_other} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
|
| |
+ %python3_other_version %(%{__python3_other} -c "import sys; sys.stdout.write(sys.version[:3])")
|
| |
+ %python3_other_version_nodots %(%{__python3_other} -c "import sys; sys.stdout.write(sys.version[:3].replace('.',''))")
|
| |
+
|
| |
+ %py3_other_shbang_opts -s
|
| |
+
|
| |
+ # Use the slashes after expand so that the command starts on the same line as
|
| |
+ # the macro
|
| |
+ %py3_other_build() %{expand:\\\
|
| |
+ CFLAGS="%{optflags}" %{__python3_other} %{py_setup} %{?py_setup_args} build --executable="%{__python3_other} %{py3_other_shbang_opts}" %{?*}
|
| |
+ sleep 1
|
| |
+ }
|
| |
+
|
| |
+ %py3_other_build_egg() %{expand:\\\
|
| |
+ CFLAGS="%{optflags}" %{__python3_other} %{py_setup} %{?py_setup_args} bdist_egg %{?*}
|
| |
+ sleep 1
|
| |
+ }
|
| |
+
|
| |
+ %py3_other_build_wheel() %{expand:\\\
|
| |
+ CFLAGS="%{optflags}" %{__python3_other} %{py_setup} %{?py_setup_args} bdist_wheel %{?*}
|
| |
+ sleep 1
|
| |
+ }
|
| |
+
|
| |
+ %py3_other_install() %{expand:\\\
|
| |
+ CFLAGS="%{optflags}" %{__python3_other} %{py_setup} %{?py_setup_args} install -O1 --skip-build --root %{buildroot} %{?*}
|
| |
+ }
|
| |
+
|
| |
+ %py3_other_install_egg() %{expand:\\\
|
| |
+ mkdir -p %{buildroot}%{python3_other_sitelib}
|
| |
+ easy_install-%{python3_other_version} -m --prefix %{buildroot}%{_prefix} -Z dist/*-py%{python3_other_version}.egg %{?*}
|
| |
+ }
|
| |
+
|
| |
+ %py3_other_install_wheel() %{expand:\\\
|
| |
+ pip%{python3_other_version} install -I dist/%{1} --root %{buildroot} --strip-file-prefix %{buildroot} --no-deps
|
| |
+ }
|
| |
This will make packaging for the other Python 3 version in EPEL 7 (currently, Python 3.6), as easy and convenient as packaging for the main Python 3 version in EPEL 7 (currently, Python 3.4).
I created a new file,
macros.python3_other
because it follows themacros.python2
/macros.python3
separation and makes it easy to compare/diff with themacros.python3
file.One thing I'm not sure about is the
%py3dir
macro. What should we do about it?