]> git.pld-linux.org Git - packages/python-pkgconfig.git/blame - python-pkgconfig.spec
- disable python3 here
[packages/python-pkgconfig.git] / python-pkgconfig.spec
CommitLineData
1d1c7ca8
JB
1#
2# Conditional build:
1828b137 3%bcond_with tests # unit tests (not included in pypi release)
1d1c7ca8 4%bcond_without python2 # CPython 2.x module
63643dc5 5%bcond_with python3 # CPython 3.x module (built from python3-pkgconfig.spec)
1d1c7ca8
JB
6
7Summary: Python 2 interface to pkg-config
8Summary(pl.UTF-8): Interfejs Pythona 2 do narzędzia pkg-config
9Name: python-pkgconfig
d54e3691
JB
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)
12Version: 1.5.2
c1321778 13Release: 4
1d1c7ca8
JB
14License: MIT
15Group: Libraries/Python
1828b137 16#Source0Download: https://pypi.org/simple/pkgconfig/
1d1c7ca8 17Source0: https://files.pythonhosted.org/packages/source/p/pkgconfig/pkgconfig-%{version}.tar.gz
d54e3691 18# Source0-md5: 0d889edf670b644bfeaa3bb9444169cb
1828b137 19URL: https://github.com/matze/pkgconfig
1d1c7ca8 20%if %{with python2}
1828b137 21BuildRequires: python-modules >= 1:2.7
1d1c7ca8 22BuildRequires: python-setuptools
1828b137
JB
23%if %{with tests}
24BuildRequires: python-pytest >= 3.8.2
25%endif
1d1c7ca8
JB
26%endif
27%if %{with python3}
1828b137 28BuildRequires: python3-modules >= 1:3.3
1d1c7ca8 29BuildRequires: python3-setuptools
1828b137
JB
30%if %{with tests}
31BuildRequires: python3-pytest >= 3.8.2
32%endif
1d1c7ca8
JB
33%endif
34BuildRequires: rpm-pythonprov
35BuildRequires: rpmbuild(macros) >= 1.714
1828b137 36Requires: python-modules >= 1:2.7
1d1c7ca8
JB
37BuildArch: noarch
38BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40%description
41pkgconfig is a Python module to interface with the pkg-config command
42line tool.
43
44%description -l pl.UTF-8
45pkgconfig to moduł Pythona do współpracy z narzędziem linii poleceń
46pkg-config.
47
48%package -n python3-pkgconfig
49Summary: Python 3 interface to pkg-config
50Summary(pl.UTF-8): Interfejs Pythona 3 do narzędzia pkg-config
51Group: Libraries/Python
1828b137 52Requires: python3-modules >= 1:3.3
1d1c7ca8
JB
53
54%description -n python3-pkgconfig
55pkgconfig is a Python module to interface with the pkg-config command
56line tool.
57
58%description -n python3-pkgconfig -l pl.UTF-8
59pkgconfig to moduł Pythona do współpracy z narzędziem linii poleceń
60pkg-config.
61
62%prep
63%setup -q -n pkgconfig-%{version}
64
65%build
66%if %{with python2}
67%py_build
68
1828b137 69%{?with_tests:%{__python} -m pytest test_pkgconfig.py}
1d1c7ca8
JB
70%endif
71
72%if %{with python3}
73%py3_build
74
1828b137 75%{?with_tests:%{__python3} -m pytest test_pkgconfig.py}
1d1c7ca8
JB
76%endif
77
78%install
79rm -rf $RPM_BUILD_ROOT
80
81%if %{with python2}
82%py_install
83
84%py_postclean
85%endif
86
87%if %{with python3}
88%py3_install
89%endif
90
91%clean
92rm -rf $RPM_BUILD_ROOT
93
94%if %{with python2}
95%files
96%defattr(644,root,root,755)
97%doc LICENSE README.rst
98%{py_sitescriptdir}/pkgconfig
99%{py_sitescriptdir}/pkgconfig-%{version}-py*.egg-info
100%endif
101
102%if %{with python3}
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
108%endif
This page took 0.177356 seconds and 4 git commands to generate.