]> git.pld-linux.org Git - SPECS.git/blob - python-pycups.spec
SPECS updated Sun 1 Aug 20:13:02 CEST 2021
[SPECS.git] / python-pycups.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5
6 %define         module  pycups
7 Summary:        Set of Python 2 bindings for the CUPS API
8 Summary(pl.UTF-8):      Zbiór wiązań Pythona 2 do API CUPS-a
9 Name:           python-%{module}
10 Version:        1.9.73
11 Release:        6
12 License:        GPL v2+
13 Group:          Development/Languages/Python
14 Source0:        http://cyberelk.net/tim/data/pycups/pycups-%{version}.tar.bz2
15 # Source0-md5:  ee0e7204d7a2ae942e2f4c4508afdbfb
16 URL:            http://cyberelk.net/tim/software/pycups/
17 BuildRequires:  rpmbuild(macros) >= 1.710
18 BuildRequires:  cups-devel >= 1.2.1
19 BuildRequires:  epydoc
20 %if %{with python2}
21 BuildRequires:  python-devel >= 1:2.5
22 %endif
23 %if %{with python3}
24 BuildRequires:  python3-devel >= 1:3.2
25 %endif
26 BuildRequires:  rpm-pythonprov
27 Requires:       python-modules
28 Obsoletes:      python-cups
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %description
32 This package provides Python 2 bindings for the CUPS API, known as
33 pycups. It was written for use with system-config-printer, but can be
34 put to other uses as well.
35
36 %description -l pl.UTF-8
37 Ten pakiet udostępnia wiązania Pythona 2 do API CUPS-a, znane jako
38 pycups. Został napisany z myślą o pakiecie system-config-printer, ale
39 może mieć także inne zastosowania.
40
41 %package -n python3-pycups
42 Summary:        Set of Python 3 bindings for the CUPS API
43 Summary(pl.UTF-8):      Zbiór wiązań Pythona 3 do API CUPS-a
44 Group:          Development/Languages/Python
45 Requires:       python3-modules
46
47 %description -n python3-pycups
48 This package provides Python 3 bindings for the CUPS API, known as
49 pycups. It was written for use with system-config-printer, but can be
50 put to other uses as well.
51
52 %description -n python3-pycups -l pl.UTF-8
53 Ten pakiet udostępnia wiązania Pythona 3 do API CUPS-a, znane jako
54 pycups. Został napisany z myślą o pakiecie system-config-printer, ale
55 może mieć także inne zastosowania.
56
57 %package doc
58 Summary:        Documentation for pycups
59 Summary(pl.UTF-8):      Dokumentacja do pycupsa
60 Group:          Documentation
61
62 %description doc
63 Documentation for pycups.
64
65 %description doc -l pl.UTF-8
66 Dokumentacja do pycupsa.
67
68 %prep
69 %setup -q -n %{module}-%{version}
70
71 %build
72 %if %{with python2}
73 CC="%{__cc}" \
74 CFLAGS="%{rpmcflags} -fno-strict-aliasing" \
75 %py_build \
76         --build-base build-2
77 %endif
78
79 %if %{with python3}
80 CC="%{__cc}" \
81 CFLAGS="%{rpmcflags} -fno-strict-aliasing" \
82 %py3_build \
83         --build-base build-3
84 %endif
85
86 %{__make} doc
87
88 %install
89 rm -rf $RPM_BUILD_ROOT
90
91 %if %{with python2}
92 %py_install
93
94 %endif
95
96 %if %{with python3}
97 %py3_install
98 %endif
99
100 %clean
101 rm -rf $RPM_BUILD_ROOT
102
103 %if %{with python2}
104 %files
105 %defattr(644,root,root,755)
106 %doc NEWS README TODO
107 %attr(755,root,root) %{py_sitedir}/cups.so
108 %{py_sitedir}/pycups-%{version}-py*.egg-info
109 %endif
110
111 %if %{with python3}
112 %files -n python3-pycups
113 %defattr(644,root,root,755)
114 %doc NEWS README TODO
115 %attr(755,root,root) %{py3_sitedir}/cups.cpython-*.so
116 %{py3_sitedir}/pycups-%{version}-py*.egg-info
117 %endif
118
119 %files doc
120 %defattr(644,root,root,755)
121 %doc html/*
This page took 0.094098 seconds and 3 git commands to generate.