Make package compliant with new packaging guidelines
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
This commit is contained in:
parent
49cc90b7a1
commit
7741601fb8
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
Name: python-%{srcname}
|
Name: python-%{srcname}
|
||||||
Version: 1.1.0
|
Version: 1.1.0
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
Summary: A Python interface to the pkg-config command line tool
|
Summary: A Python interface to the pkg-config command line tool
|
||||||
|
|
||||||
License: MIT
|
License: MIT
|
||||||
@ -11,10 +11,6 @@ URL: https://github.com/matze/%{srcname}
|
|||||||
Source0: https://github.com/matze/%{srcname}/archive/v%{version}.tar.gz#/%{srcname}-%{version}.tar.gz
|
Source0: https://github.com/matze/%{srcname}/archive/v%{version}.tar.gz#/%{srcname}-%{version}.tar.gz
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: python2-devel
|
|
||||||
BuildRequires: python-setuptools
|
|
||||||
# For tests
|
|
||||||
BuildRequires: python-nose
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
pkgconfig is a Python module to interface with the pkg-config command line
|
pkgconfig is a Python module to interface with the pkg-config command line
|
||||||
@ -29,15 +25,16 @@ It can be used to
|
|||||||
|
|
||||||
If pkg-config is not on the path, raises EnvironmentError.
|
If pkg-config is not on the path, raises EnvironmentError.
|
||||||
|
|
||||||
%package -n python3-%{srcname}
|
%package -n python2-%{srcname}
|
||||||
Summary: A Python3 interface to the pkg-config command line tool
|
Summary: A Python2 interface to the pkg-config ocmmand line tool
|
||||||
BuildRequires: python3-devel
|
%{?python_provide:%python_provide python2-%{srcname}}
|
||||||
BuildRequires: python3-setuptools
|
BuildRequires: python2-devel
|
||||||
|
BuildRequires: python2-setuptools
|
||||||
# For tests
|
# For tests
|
||||||
BuildRequires: python3-nose
|
BuildRequires: python2-nose
|
||||||
|
|
||||||
%description -n python3-%{srcname}
|
%description -n python2-%{srcname}
|
||||||
pkgconfig is a Python3 module to interface with the pkg-config command line
|
pkgconfig is a Python module to interface with the pkg-config command line
|
||||||
tool and supports Python 2.6+.
|
tool and supports Python 2.6+.
|
||||||
|
|
||||||
It can be used to
|
It can be used to
|
||||||
@ -49,39 +46,62 @@ It can be used to
|
|||||||
|
|
||||||
If pkg-config is not on the path, raises EnvironmentError.
|
If pkg-config is not on the path, raises EnvironmentError.
|
||||||
|
|
||||||
%prep
|
Python 2 version.
|
||||||
%setup -q -n %{srcname}-%{version}
|
|
||||||
# Strip shbang
|
|
||||||
find -name \*.py | xargs sed -i '/^#!\/usr\/bin\/.*python/d'
|
|
||||||
|
|
||||||
|
%package -n python3-%{srcname}
|
||||||
|
Summary: A Python3 interface to the pkg-config command line tool
|
||||||
|
%{?python_provide:%python_provide python3-%{srcname}}
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: python3-setuptools
|
||||||
|
# For tests
|
||||||
|
BuildRequires: python3-nose
|
||||||
|
|
||||||
|
%description -n python3-%{srcname}
|
||||||
|
pkgconfig is a Python module to interface with the pkg-config command line
|
||||||
|
tool and supports Python 2.6+.
|
||||||
|
|
||||||
|
It can be used to
|
||||||
|
|
||||||
|
* check if a package exists
|
||||||
|
* check if a package meets certain version requirements
|
||||||
|
* query CFLAGS and LDFLAGS
|
||||||
|
* parse the output to build extensions with setup.py
|
||||||
|
|
||||||
|
If pkg-config is not on the path, raises EnvironmentError.
|
||||||
|
|
||||||
|
Python 3 version.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n %{srcname}-%{version}
|
||||||
|
# Strip shebang
|
||||||
|
find -type f -name '*.py' -exec sed -i -e '1{\@^#!/usr/bin/env python@d}' {} ';'
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{__python2} setup.py build
|
%py2_build
|
||||||
%{__python3} setup.py build
|
%py3_build
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{__python3} setup.py install --skip-build --root %{buildroot}
|
%py2_install
|
||||||
%{__python2} setup.py install --skip-build --root %{buildroot}
|
%py3_install
|
||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%{__python2} setup.py test
|
%{__python2} setup.py test
|
||||||
%{__python3} setup.py test
|
%{__python3} setup.py test
|
||||||
|
|
||||||
|
%files -n python2-%{srcname}
|
||||||
%files
|
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
%{python2_sitelib}/*
|
%{python2_sitelib}/%{srcname}*
|
||||||
|
|
||||||
%files -n python3-%{srcname}
|
%files -n python3-%{srcname}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
%{python3_sitelib}/*
|
%{python3_sitelib}/%{srcname}*
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Feb 14 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 1.1.0-5
|
||||||
|
- Make package compliant with new packaging guidelines
|
||||||
|
|
||||||
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-4
|
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-4
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user