2017-03-03 12:52:35 +00:00
|
|
|
%__python3 /usr/bin/python3
|
2017-10-25 18:56:17 +00:00
|
|
|
%python3_sitelib %(%{__python3} -Ic "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
|
|
|
|
%python3_sitearch %(%{__python3} -Ic "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
|
|
|
|
%python3_version %(%{__python3} -Ic "import sys; sys.stdout.write(sys.version[:3])")
|
|
|
|
%python3_version_nodots %(%{__python3} -Ic "import sys; sys.stdout.write(sys.version[:3].replace('.',''))")
|
2016-01-12 23:52:28 +00:00
|
|
|
%py3dir %{_builddir}/python3-%{name}-%{version}-%{release}
|
|
|
|
|
|
|
|
%py3_shbang_opts -s
|
|
|
|
|
2016-11-24 14:53:47 +00:00
|
|
|
# Use the slashes after expand so that the command starts on the same line as
|
|
|
|
# the macro
|
|
|
|
%py3_build() %{expand:\\\
|
2017-03-03 12:52:35 +00:00
|
|
|
CFLAGS="%{optflags}" %{__python3} %{py_setup} %{?py_setup_args} build --executable="%{__python3} %{py3_shbang_opts}" %{?*}
|
2016-11-15 23:16:16 +00:00
|
|
|
sleep 1
|
2016-01-12 23:52:28 +00:00
|
|
|
}
|
|
|
|
|
2016-11-24 14:53:47 +00:00
|
|
|
%py3_build_egg() %{expand:\\\
|
2016-11-16 23:28:31 +00:00
|
|
|
CFLAGS="%{optflags}" %{__python3} %{py_setup} %{?py_setup_args} bdist_egg %{?*}
|
|
|
|
sleep 1
|
|
|
|
}
|
|
|
|
|
2016-11-24 14:53:47 +00:00
|
|
|
%py3_build_wheel() %{expand:\\\
|
2016-11-16 23:28:31 +00:00
|
|
|
CFLAGS="%{optflags}" %{__python3} %{py_setup} %{?py_setup_args} bdist_wheel %{?*}
|
2016-11-15 23:12:23 +00:00
|
|
|
sleep 1
|
|
|
|
}
|
|
|
|
|
2016-11-24 14:53:47 +00:00
|
|
|
%py3_install() %{expand:\\\
|
2017-03-03 12:52:35 +00:00
|
|
|
CFLAGS="%{optflags}" %{__python3} %{py_setup} %{?py_setup_args} install -O1 --skip-build --root %{buildroot} %{?*}
|
2016-01-12 23:52:28 +00:00
|
|
|
}
|
2016-11-15 23:12:23 +00:00
|
|
|
|
2016-11-24 14:53:47 +00:00
|
|
|
%py3_install_egg() %{expand:\\\
|
2016-11-15 23:12:23 +00:00
|
|
|
mkdir -p %{buildroot}%{python3_sitelib}
|
|
|
|
easy_install-%{python3_version} -m --prefix %{buildroot}%{_prefix} -Z dist/*-py%{python3_version}.egg %{?*}
|
|
|
|
}
|
2016-11-16 23:28:31 +00:00
|
|
|
|
2016-11-24 14:53:47 +00:00
|
|
|
%py3_install_wheel() %{expand:\\\
|
2017-03-03 12:52:35 +00:00
|
|
|
pip%{python3_version} install -I dist/%{1} --root %{buildroot} --strip-file-prefix %{buildroot} --no-deps
|
2016-11-17 04:32:46 +00:00
|
|
|
}
|