]> git.pld-linux.org Git - packages/python-pycdio.git/blob - python-pycdio.spec
rebuild with python 3.10
[packages/python-pycdio.git] / python-pycdio.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5
6 Summary:        Python 2 bindings for libcdio
7 Summary(pl.UTF-8):      Wiązania Pythona 2 do libcdio
8 Name:           python-pycdio
9 Version:        2.1.0
10 Release:        5
11 License:        GPL v2+
12 Group:          Libraries/Python
13 Source0:        https://ftp.gnu.org/gnu/libcdio/pycdio-%{version}.tar.gz
14 # Source0-md5:  d1adcee07dc0f510a983547bf5046632
15 URL:            http://www.gnu.org/software/libcdio/
16 BuildRequires:  libcdio-devel >= 2.0.0
17 BuildRequires:  pkgconfig
18 %if %{with python2}
19 BuildRequires:  python-devel >= 1:2.3.5
20 BuildRequires:  python-setuptools
21 %endif
22 %if %{with python3}
23 BuildRequires:  python3-devel >= 1:3.2
24 BuildRequires:  python3-setuptools
25 %endif
26 BuildRequires:  rpm-pythonprov
27 BuildRequires:  rpmbuild(macros) >= 1.714
28 BuildRequires:  swig-python >= 3
29 Requires:       libcdio >= 2.0.0
30 Requires:       python-libs >= 1:2.3.5
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 Python 2 bindings for libcdio.
35
36 %description -l pl.UTF-8
37 Wiązania Pythona 2 do libcdio.
38
39 %package -n python3-pycdio
40 Summary:        Python 3 bindings for libcdio
41 Summary(pl.UTF-8):      Wiązania Pythona 3 do libcdio
42 Group:          Libraries/Python
43 Requires:       libcdio >= 2.0.0
44 Requires:       python3-libs >= 1:3.2
45
46 %description -n python3-pycdio
47 Python 3 bindings for libcdio.
48
49 %description -n python3-pycdio -l pl.UTF-8
50 Wiązania Pythona 3 do libcdio.
51
52 %package examples
53 Summary:        Example programs using Python libcdio bindings
54 Summary(pl.UTF-8):      Przykładowe programy w Pythonie używające libcdio
55 Group:          Libraries/Python
56 Requires:       %{name} = %{version}-%{release}
57
58 %description examples
59 Example programs using Python libcdio bindings.
60
61 %description examples -l pl.UTF-8
62 Przykładowe programy w Pythonie używające libcdio.
63
64 %prep
65 %setup -q -n pycdio-%{version}
66
67 %{__sed} -i -e '1s,#!.*python,#!%{__python3},' example/*.py
68
69 %build
70 %if %{with python2}
71 %py_build
72 %endif
73
74 %if %{with python3}
75 %py3_build
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 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
92 install example/{*.py,README} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
93
94 %clean
95 rm -rf $RPM_BUILD_ROOT
96
97 %if %{with python2}
98 %files
99 %defattr(644,root,root,755)
100 %doc ChangeLog README.rst THANKS
101 %attr(755,root,root) %{py_sitedir}/_pycdio.so
102 %attr(755,root,root) %{py_sitedir}/_pyiso9660.so
103 %{py_sitedir}/cdio.py[co]
104 %{py_sitedir}/iso9660.py[co]
105 %{py_sitedir}/pycdio.py[co]
106 %{py_sitedir}/pyiso9660.py[co]
107 %{py_sitedir}/pycdio-%{version}-py*.egg-info
108 %endif
109
110 %if %{with python3}
111 %files -n python3-pycdio
112 %defattr(644,root,root,755)
113 %doc ChangeLog README.rst THANKS
114 %attr(755,root,root) %{py3_sitedir}/_pycdio.cpython-*.so
115 %attr(755,root,root) %{py3_sitedir}/_pyiso9660.cpython-*.so
116 %{py3_sitedir}/cdio.py
117 %{py3_sitedir}/iso9660.py
118 %{py3_sitedir}/pycdio.py
119 %{py3_sitedir}/pyiso9660.py
120 %{py3_sitedir}/__pycache__/cdio.cpython-*.py[co]
121 %{py3_sitedir}/__pycache__/iso9660.cpython-*.py[co]
122 %{py3_sitedir}/__pycache__/pycdio.cpython-*.py[co]
123 %{py3_sitedir}/__pycache__/pyiso9660.cpython-*.py[co]
124 %{py3_sitedir}/pycdio-%{version}-py*.egg-info
125 %endif
126
127 %files examples
128 %defattr(644,root,root,755)
129 %{_examplesdir}/%{name}-%{version}
This page took 0.094293 seconds and 3 git commands to generate.