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