forked from rpms/python-rpm-macros
37 lines
1.4 KiB
Plaintext
37 lines
1.4 KiB
Plaintext
%__python3 /usr/bin/python3
|
|
%python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
|
|
%python3_sitearch %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
|
|
%python3_version %(%{__python3} -c "import sys; sys.stdout.write(sys.version[:3])")
|
|
%python3_version_nodots %(%{__python3} -c "import sys; sys.stdout.write(sys.version[:3].replace('.',''))")
|
|
%py3dir %{_builddir}/python3-%{name}-%{version}-%{release}
|
|
|
|
%py3_shbang_opts -s
|
|
|
|
%py3_build() %{expand:
|
|
CFLAGS="%{optflags}" %{__python3} %{py_setup} %{?py_setup_args} build --executable="%{__python3} %{py3_shbang_opts}" %{?*}
|
|
sleep 1
|
|
}
|
|
|
|
%py3_build_egg() %{expand:
|
|
CFLAGS="%{optflags}" %{__python3} %{py_setup} %{?py_setup_args} bdist_egg %{?*}
|
|
sleep 1
|
|
}
|
|
|
|
%py3_build_wheel() %{expand:
|
|
CFLAGS="%{optflags}" %{__python3} %{py_setup} %{?py_setup_args} bdist_wheel %{?*}
|
|
sleep 1
|
|
}
|
|
|
|
%py3_install() %{expand:
|
|
CFLAGS="%{optflags}" %{__python3} %{py_setup} %{?py_setup_args} install -O1 --skip-build --root %{buildroot} %{?*}
|
|
}
|
|
|
|
%py3_install_egg() %{expand:
|
|
mkdir -p %{buildroot}%{python3_sitelib}
|
|
easy_install-%{python3_version} -m --prefix %{buildroot}%{_prefix} -Z dist/*-py%{python3_version}.egg %{?*}
|
|
}
|
|
|
|
%py3_install_wheel() %{expand:
|
|
pip%{python3_version} install -I dist/%{1} --root %{buildroot} --strip-file-prefix %{buildroot}
|
|
}
|