From 610e31414390f2c0b12703a86e8f68a73a2cd488 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 18 May 2015 11:51:25 -0600 Subject: [PATCH] Initial import --- .gitignore | 1 + python-pkgconfig.spec | 98 +++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 100 insertions(+) create mode 100644 python-pkgconfig.spec diff --git a/.gitignore b/.gitignore index e69de29..9ba9864 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/pkgconfig-1.1.0.tar.gz diff --git a/python-pkgconfig.spec b/python-pkgconfig.spec new file mode 100644 index 0000000..ba9348d --- /dev/null +++ b/python-pkgconfig.spec @@ -0,0 +1,98 @@ +%global srcname pkgconfig +%global _docdir_fmt %{name} + +Name: python-%{srcname} +Version: 1.1.0 +Release: 1%{?dist} +Summary: A Python interface to the pkg-config command line tool + +License: MIT +URL: https://github.com/matze/%{srcname} +Source0: https://github.com/matze/%{srcname}/archive/v%{version}.tar.gz#/%{srcname}-%{version}.tar.gz + +BuildArch: noarch +BuildRequires: python2-devel +BuildRequires: python-setuptools + +%description +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. + +%package -n python3-%{srcname} +Summary: A Python3 interface to the pkg-config command line tool +BuildRequires: python3-devel +BuildRequires: python3-setuptools + +%description -n python3-%{srcname} +pkgconfig is a Python3 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. + +%prep +%setup -qc +mv %{srcname}-%{version} python2 +# Strip shbang +find -name \*.py | xargs sed -i '/^#!\/usr\/bin\/.*python/d' +cp -a python2 python3 +#2to3 --write --nobackups python3 + + +%build +pushd python2 +%{__python2} setup.py build +popd +pushd python3 +%{__python3} setup.py build +popd + + +%install +pushd python3 +%{__python3} setup.py install --skip-build --root %{buildroot} +popd + +pushd python2 +%{__python2} setup.py install --skip-build --root %{buildroot} +popd + + +%check +pushd python2 +%{__python2} setup.py test +popd +pushd python3 +%{__python3} setup.py test +popd + + +%files +%license python2/LICENSE +%doc python2/README.rst +%{python2_sitelib}/* + +%files -n python3-%{srcname} +%license python3/LICENSE +%doc python3/README.rst +%{python3_sitelib}/* + + +%changelog +* Sun May 17 2015 Orion Poplawski - 1.1.0-1 +- Initial package diff --git a/sources b/sources index e69de29..21dcc69 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +4eaacf9931965852f9a16a3e0cb12407 pkgconfig-1.1.0.tar.gz