Compare commits

...

2 Commits
rawhide ... f26

Author SHA1 Message Date
Igor Gnatenko d25246c859 add macros to enable dependency generator
References: https://fedoraproject.org/wiki/Changes/EnablingPythonGenerators
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
(cherry picked from commit ec476c84cc)
2018-01-19 16:16:32 +01:00
Michal Cyprian f37b53c397 Revert "Switch %%__python3 to /usr/libexec/system-python"
- The Fedora Change https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe
  was postponed
- This reverts commit d019d2fd4d
2017-03-03 14:00:00 +01:00
3 changed files with 17 additions and 6 deletions

View File

@ -71,3 +71,7 @@
print(" not recognized.")
end
}
%python_enable_dependency_generator() \
%global __python_requires %{_rpmconfigdir}/pythondistdeps.py --requires \
%{nil}

View File

@ -1,5 +1,4 @@
%__python3 /usr/libexec/system-python
%__python3_bin /usr/bin/python3
%__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])")
@ -11,7 +10,7 @@
# Use the slashes after expand so that the command starts on the same line as
# the macro
%py3_build() %{expand:\\\
CFLAGS="%{optflags}" %{__python3} %{py_setup} %{?py_setup_args} build --executable="%{__python3_bin} %{py3_shbang_opts}" %{?*}
CFLAGS="%{optflags}" %{__python3} %{py_setup} %{?py_setup_args} build --executable="%{__python3} %{py3_shbang_opts}" %{?*}
sleep 1
}
@ -26,7 +25,7 @@
}
%py3_install() %{expand:\\\
CFLAGS="%{optflags}" %{__python3} %{py_setup} %{?py_setup_args} install -O1 --skip-build --root %{buildroot} --executable="%{__python3_bin} %{py3_shbang_opts}" %{?*}
CFLAGS="%{optflags}" %{__python3} %{py_setup} %{?py_setup_args} install -O1 --skip-build --root %{buildroot} %{?*}
}
%py3_install_egg() %{expand:\\\
@ -35,5 +34,5 @@
}
%py3_install_wheel() %{expand:\\\
pip%{python3_version} install -I dist/%{1} --root %{buildroot} --strip-file-prefix %{buildroot} --prefix %{_prefix} --no-deps
pip%{python3_version} install -I dist/%{1} --root %{buildroot} --strip-file-prefix %{buildroot} --no-deps
}

View File

@ -1,6 +1,6 @@
Name: python-rpm-macros
Version: 3
Release: 19%{?dist}
Release: 21%{?dist}
Summary: The unversioned Python RPM macros
License: MIT
@ -69,6 +69,14 @@ install -m 644 %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} \
%changelog
* Fri Jan 19 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 3-25
- Add %%python_enable_dependency_generator
* Fri Mar 03 2017 Michal Cyprian <mcyprian@redhat.com> - 3-20
- Revert "Switch %%__python3 to /usr/libexec/system-python"
after the Fedora Change https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe
was postponed
* Fri Feb 17 2017 Michal Cyprian <mcyprian@redhat.com> - 3-19
- Switch %%__python3 to /usr/libexec/system-python