3 %bcond_with tests # unit tests (not included in pypi release)
4 %bcond_without python2 # CPython 2.x module
5 %bcond_with python3 # CPython 3.x module (built from python3-pkgconfig.spec)
7 Summary: Python 2 interface to pkg-config
8 Summary(pl.UTF-8): Interfejs Pythona 2 do narzędzia pkg-config
10 # keep 1.5.2 here for python2 support
11 # (oficial support dropped in 1.5.4, but 1.5.3 has syntax errors under python2)
15 Group: Libraries/Python
16 #Source0Download: https://pypi.org/simple/pkgconfig/
17 Source0: https://files.pythonhosted.org/packages/source/p/pkgconfig/pkgconfig-%{version}.tar.gz
18 # Source0-md5: 0d889edf670b644bfeaa3bb9444169cb
19 URL: https://github.com/matze/pkgconfig
21 BuildRequires: python-modules >= 1:2.7
22 BuildRequires: python-setuptools
24 BuildRequires: python-pytest >= 3.8.2
28 BuildRequires: python3-modules >= 1:3.3
29 BuildRequires: python3-setuptools
31 BuildRequires: python3-pytest >= 3.8.2
34 BuildRequires: rpm-pythonprov
35 BuildRequires: rpmbuild(macros) >= 1.714
36 Requires: python-modules >= 1:2.7
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 pkgconfig is a Python module to interface with the pkg-config command
44 %description -l pl.UTF-8
45 pkgconfig to moduł Pythona do współpracy z narzędziem linii poleceń
48 %package -n python3-pkgconfig
49 Summary: Python 3 interface to pkg-config
50 Summary(pl.UTF-8): Interfejs Pythona 3 do narzędzia pkg-config
51 Group: Libraries/Python
52 Requires: python3-modules >= 1:3.3
54 %description -n python3-pkgconfig
55 pkgconfig is a Python module to interface with the pkg-config command
58 %description -n python3-pkgconfig -l pl.UTF-8
59 pkgconfig to moduł Pythona do współpracy z narzędziem linii poleceń
63 %setup -q -n pkgconfig-%{version}
69 %{?with_tests:%{__python} -m pytest test_pkgconfig.py}
75 %{?with_tests:%{__python3} -m pytest test_pkgconfig.py}
79 rm -rf $RPM_BUILD_ROOT
92 rm -rf $RPM_BUILD_ROOT
96 %defattr(644,root,root,755)
97 %doc LICENSE README.rst
98 %{py_sitescriptdir}/pkgconfig
99 %{py_sitescriptdir}/pkgconfig-%{version}-py*.egg-info
103 %files -n python3-pkgconfig
104 %defattr(644,root,root,755)
105 %doc LICENSE README.rst
106 %{py3_sitescriptdir}/pkgconfig
107 %{py3_sitescriptdir}/pkgconfig-%{version}-py*.egg-info