Last change
on this file was 1562, checked in by Silvan Scherrer, 7 years ago |
spec: python-rpm-macros: Release version 1-3.
|
File size:
1.5 KB
|
Rev | Line | |
---|
[1562] | 1 | %__python2 /@unixroot/usr/bin/python2
|
---|
[1040] | 2 | %python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
|
---|
| 3 | %python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
|
---|
| 4 | %python2_version %(%{__python2} -c "import sys; sys.stdout.write('{0.major}.{0.minor}'.format(sys.version_info))")
|
---|
| 5 | %python2_version_nodots %(%{__python2} -c "import sys; sys.stdout.write('{0.major}{0.minor}'.format(sys.version_info))")
|
---|
| 6 |
|
---|
| 7 | %py2_shbang_opts -s
|
---|
| 8 |
|
---|
| 9 | # Use the slashes after expand so that the command starts on the same line as
|
---|
| 10 | # the macro
|
---|
| 11 | %py2_build() %{expand:\\\
|
---|
| 12 | CFLAGS="%{optflags}" %{__python2} %{py_setup} %{?py_setup_args} build --executable="%{__python2} %{py2_shbang_opts}" %{?*}
|
---|
| 13 | sleep 1
|
---|
| 14 | }
|
---|
| 15 |
|
---|
| 16 | %py2_build_egg() %{expand:\\\
|
---|
| 17 | CFLAGS="%{optflags}" %{__python2} %{py_setup} %{?py_setup_args} bdist_egg %{?*}
|
---|
| 18 | sleep 1
|
---|
| 19 | }
|
---|
| 20 |
|
---|
| 21 | %py2_build_wheel() %{expand:\\\
|
---|
| 22 | CFLAGS="%{optflags}" %{__python2} %{py_setup} %{?py_setup_args} bdist_wheel %{?*}
|
---|
| 23 | sleep 1
|
---|
| 24 | }
|
---|
| 25 |
|
---|
| 26 | %py2_install() %{expand:\\\
|
---|
| 27 | CFLAGS="%{optflags}" %{__python2} %{py_setup} %{?py_setup_args} install -O1 --skip-build --root %{buildroot} %{?*}
|
---|
| 28 | }
|
---|
| 29 |
|
---|
| 30 | %py2_install_egg() %{expand:\\\
|
---|
| 31 | mkdir -p %{buildroot}%{python2_sitelib}
|
---|
| 32 | easy_install-%{python2_version} -m --prefix %{buildroot}%{_prefix} -Z dist/*-py%{python2_version}.egg %{?*}
|
---|
| 33 | }
|
---|
| 34 |
|
---|
| 35 | %py2_install_wheel() %{expand:\\\
|
---|
| 36 | pip%{python2_version} install -I dist/%{1} --root %{buildroot} --strip-file-prefix %{buildroot} --no-deps
|
---|
| 37 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.