|
|
f5a09a |
%__python3 /usr/bin/python3
|
|
|
f5a09a |
%python3_sitelib %(%{__python3} -Ic "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
|
|
|
f5a09a |
%python3_sitearch %(%{__python3} -Ic "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
|
|
|
f5a09a |
%python3_version %(%{__python3} -Ic "import sys; sys.stdout.write(sys.version[:3])")
|
|
|
f5a09a |
%python3_version_nodots %(%{__python3} -Ic "import sys; sys.stdout.write(sys.version[:3].replace('.',''))")
|
|
|
f5a09a |
%python3_platform %(%{__python3} -Ic "import sysconfig; print(sysconfig.get_platform())")
|
|
|
f5a09a |
%py3dir %{_builddir}/python3-%{name}-%{version}-%{release}
|
|
|
f5a09a |
|
|
|
f5a09a |
%py3_shbang_opts -s
|
|
|
f5a09a |
|
|
|
f5a09a |
# Use the slashes after expand so that the command starts on the same line as
|
|
|
f5a09a |
# the macro
|
|
|
f5a09a |
%py3_build() %{expand:\\\
|
|
|
f5a09a |
CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\
|
|
|
f5a09a |
%{__python3} %{py_setup} %{?py_setup_args} build --executable="%{__python3} %{py3_shbang_opts}" %{?*}
|
|
|
f5a09a |
sleep 1
|
|
|
f5a09a |
}
|
|
|
f5a09a |
|
|
|
f5a09a |
%py3_build_egg() %{expand:\\\
|
|
|
f5a09a |
CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\
|
|
|
f5a09a |
%{__python3} %{py_setup} %{?py_setup_args} bdist_egg %{?*}
|
|
|
f5a09a |
sleep 1
|
|
|
f5a09a |
}
|
|
|
f5a09a |
|
|
|
f5a09a |
%py3_build_wheel() %{expand:\\\
|
|
|
f5a09a |
CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\
|
|
|
f5a09a |
%{__python3} %{py_setup} %{?py_setup_args} bdist_wheel %{?*}
|
|
|
f5a09a |
sleep 1
|
|
|
f5a09a |
}
|
|
|
f5a09a |
|
|
|
f5a09a |
%py3_install() %{expand:\\\
|
|
|
f5a09a |
CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\
|
|
|
f5a09a |
%{__python3} %{py_setup} %{?py_setup_args} install -O1 --skip-build --root %{buildroot} %{?*}
|
|
|
f5a09a |
}
|
|
|
f5a09a |
|
|
|
f5a09a |
%py3_install_egg() %{expand:\\\
|
|
|
f5a09a |
mkdir -p %{buildroot}%{python3_sitelib}
|
|
|
f5a09a |
easy_install-%{python3_version} -m --prefix %{buildroot}%{_prefix} -Z dist/*-py%{python3_version}.egg %{?*}
|
|
|
f5a09a |
}
|
|
|
f5a09a |
|
|
|
f5a09a |
%py3_install_wheel() %{expand:\\\
|
|
|
f5a09a |
pip%{python3_version} install -I dist/%{1} --root %{buildroot} --strip-file-prefix %{buildroot} --no-deps
|
|
|
f5a09a |
}
|