]> git.pld-linux.org Git - packages/python-pkgconfig.git/blob - python-pkgconfig.spec
- disable python3 here
[packages/python-pkgconfig.git] / python-pkgconfig.spec
1 #
2 # Conditional build:
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)
6
7 Summary:        Python 2 interface to pkg-config
8 Summary(pl.UTF-8):      Interfejs Pythona 2 do narzędzia pkg-config
9 Name:           python-pkgconfig
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)
12 Version:        1.5.2
13 Release:        4
14 License:        MIT
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
20 %if %{with python2}
21 BuildRequires:  python-modules >= 1:2.7
22 BuildRequires:  python-setuptools
23 %if %{with tests}
24 BuildRequires:  python-pytest >= 3.8.2
25 %endif
26 %endif
27 %if %{with python3}
28 BuildRequires:  python3-modules >= 1:3.3
29 BuildRequires:  python3-setuptools
30 %if %{with tests}
31 BuildRequires:  python3-pytest >= 3.8.2
32 %endif
33 %endif
34 BuildRequires:  rpm-pythonprov
35 BuildRequires:  rpmbuild(macros) >= 1.714
36 Requires:       python-modules >= 1:2.7
37 BuildArch:      noarch
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %description
41 pkgconfig is a Python module to interface with the pkg-config command
42 line tool.
43
44 %description -l pl.UTF-8
45 pkgconfig to moduł Pythona do współpracy z narzędziem linii poleceń
46 pkg-config.
47
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
53
54 %description -n python3-pkgconfig
55 pkgconfig is a Python module to interface with the pkg-config command
56 line tool.
57
58 %description -n python3-pkgconfig -l pl.UTF-8
59 pkgconfig to moduł Pythona do współpracy z narzędziem linii poleceń
60 pkg-config.
61
62 %prep
63 %setup -q -n pkgconfig-%{version}
64
65 %build
66 %if %{with python2}
67 %py_build
68
69 %{?with_tests:%{__python} -m pytest test_pkgconfig.py}
70 %endif
71
72 %if %{with python3}
73 %py3_build
74
75 %{?with_tests:%{__python3} -m pytest test_pkgconfig.py}
76 %endif
77
78 %install
79 rm -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
92 rm -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.115953 seconds and 3 git commands to generate.