#2 Update Python macros to new packaging standards
Merged 6 years ago by kevin. Opened 6 years ago by churchyard.
rpms/ churchyard/pyliblzma py2macros  into  master

file modified
+13 -9
@@ -1,13 +1,13 @@ 

  %if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)

- %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}

- %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}

+ %{!?python_sitelib: %global python_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}

+ %{!?python_sitearch: %global python_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}

  %endif

  

  

  Summary:    Python bindings for lzma

  Name:       pyliblzma

  Version:    0.5.3

- Release:    21%{?dist}

+ Release:    22%{?dist}

  License:    LGPLv3+

  URL:        https://launchpad.net/pyliblzma

  Source0:    http://pypi.python.org/packages/source/p/pyliblzma/%{name}-%{version}.tar.bz2
@@ -27,25 +27,29 @@ 

  %patch0 -p1 

  

  %build

- %{__python} setup.py build

+ %{__python2} setup.py build

  

  %check

- %{__python} setup.py test

+ %{__python2} setup.py test

  

  %install

  rm -rf %{buildroot}

- %{__python} setup.py install --root=%{buildroot}

+ %{__python2} setup.py install --root=%{buildroot}

  

  %files

  %defattr(-,root,root)

  %{!?_licensedir:%global license %%doc}

  %license COPYING

  %doc README THANKS ChangeLog NEWS

- %attr(0755,-,-) %{python_sitearch}/lzma.so

- %{python_sitearch}/liblzma.py*

- %{python_sitearch}/%{name}*.egg-info

+ %attr(0755,-,-) %{python2_sitearch}/lzma.so

+ %{python2_sitearch}/liblzma.py*

+ %{python2_sitearch}/%{name}*.egg-info

  

  %changelog

+ * Sat May 05 2018 Miro Hrončok <mhroncok@redhat.com> - 0.5.3-22

+ - Update Python macros to new packaging standards

+   (See https://fedoraproject.org/wiki/Changes/Avoid_usr_bin_python_in_RPM_Build)

+ 

  * Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.3-21

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

  

This package uses macros with ambiguous python.

According to Fedora Packaging guidelines for Python, packages must use macros with either python2 or python3.

This PR is part of Fedora's Change Avoid /usr/bin/python in RPM build.

Note that, although this PR was created automatically, we will respond to any comments or issues which you might find with it. We will keep the PR open for review for a week, and if there's no feedback we'll merge it. There is no need to build the package right after merge, this change can wait for the next package rebuild.
For Koji scratch build please see simple-koji-ci result.

This PR was opened automatically, for source code see here

Pull-Request has been merged by kevin

6 years ago