Last change
on this file since 1126 was 1126, checked in by Silvan Scherrer, 8 years ago |
spec: python-rpm-macros: Release version 1-2.
|
File size:
1.6 KB
|
Line | |
---|
1 | %__python3 /@unixroot/usr/libexec/system-python
|
---|
2 | %__python3_bin /@unixroot/usr/bin/python3.exe
|
---|
3 | %python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
|
---|
4 | %python3_sitearch %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
|
---|
5 | %python3_version %(%{__python3} -c "import sys; sys.stdout.write(sys.version[:3])")
|
---|
6 | %python3_version_nodots %(%{__python3} -c "import sys; sys.stdout.write(sys.version[:3].replace('.',''))")
|
---|
7 | %py3dir %{_builddir}/python3-%{name}-%{version}-%{release}
|
---|
8 |
|
---|
9 | %py3_shbang_opts -s
|
---|
10 |
|
---|
11 | # Use the slashes after expand so that the command starts on the same line as
|
---|
12 | # the macro
|
---|
13 | %py3_build() %{expand:\\\
|
---|
14 | CFLAGS="%{optflags}" %{__python3} %{py_setup} %{?py_setup_args} build --executable="%{__python3_bin} %{py3_shbang_opts}" %{?*}
|
---|
15 | sleep 1
|
---|
16 | }
|
---|
17 |
|
---|
18 | %py3_build_egg() %{expand:\\\
|
---|
19 | CFLAGS="%{optflags}" %{__python3} %{py_setup} %{?py_setup_args} bdist_egg %{?*}
|
---|
20 | sleep 1
|
---|
21 | }
|
---|
22 |
|
---|
23 | %py3_build_wheel() %{expand:\\\
|
---|
24 | CFLAGS="%{optflags}" %{__python3} %{py_setup} %{?py_setup_args} bdist_wheel %{?*}
|
---|
25 | sleep 1
|
---|
26 | }
|
---|
27 |
|
---|
28 | %py3_install() %{expand:\\\
|
---|
29 | CFLAGS="%{optflags}" %{__python3} %{py_setup} %{?py_setup_args} install -O1 --skip-build --root %{buildroot} --executable="%{__python3_bin} %{py3_shbang_opts}" %{?*}
|
---|
30 | }
|
---|
31 |
|
---|
32 | %py3_install_egg() %{expand:\\\
|
---|
33 | mkdir -p %{buildroot}%{python3_sitelib}
|
---|
34 | easy_install-%{python3_version} -m --prefix %{buildroot}%{_prefix} -Z dist/*-py%{python3_version}.egg %{?*}
|
---|
35 | }
|
---|
36 |
|
---|
37 | %py3_install_wheel() %{expand:\\\
|
---|
38 | pip%{python3_version} install -I dist/%{1} --root %{buildroot} --strip-file-prefix %{buildroot} --prefix %{_prefix} --no-deps
|
---|
39 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.