-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmacros.python3
More file actions
31 lines (25 loc) · 1.43 KB
/
macros.python3
File metadata and controls
31 lines (25 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# SPDX-License-Identifier: MIT
%__python3 /usr/bin/python3
%python3_sitelib %(%{__python3} -Esc "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
%python3_sitearch %(%{__python3} -Esc "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
%python3_version %(%{__python3} -Esc "import sys; sys.stdout.write('{0.major}.{0.minor}'.format(sys.version_info))")
%python3_version_nodots %(%{__python3} -Esc "import sys; sys.stdout.write('{0.major}{0.minor}'.format(sys.version_info))")
%python3_pkgversion 3
%_py3_shebang_s s
%_py3_shebang_P %(RPM_BUILD_ROOT= %{__python3} -Ic "import sys; print('P' if hasattr(sys.flags, 'safe_path') else '')")
%py3_shbang_opts -%{?_py3_shebang_s}%{?_py3_shebang_P}
%py3_shbang_opts_nodash %(opts=%{py3_shbang_opts}; echo ${opts#-})
%py3_shebang_flags %(opts=%{py3_shbang_opts}; echo ${opts#-})
%py3_shebang_fix %{__python3} -B %{_debconfigdir}/pathfix.py -pni %{__python3} -ka%{py3_shebang_flags}
%py3_build CFLAGS="%{optflags}" %{__python3} %{py_setup} %{?py_setup_args} build --executable="%{__python3} %{py3_shbang_opts}"
%py3_install %{__python3} %{py_setup} %{?py_setup_args} install --no-compile -O0 --skip-build --root %{buildroot} --install-layout=deb
%py3_bytecompile_requires \
Requires(preun): python3-minimal \
Requires(post): python3-minimal \
%{nil}
%py3_bytecompile_post() \
py3compile -p %{1} -V -4.0 \
%{nil}
%py3_bytecompile_preun() \
py3clean -p %{1} \
%{nil}