]> git.pld-linux.org Git - packages/python-pycdio.git/blame - python-pycdio.spec
rebuild with tests and docs
[packages/python-pycdio.git] / python-pycdio.spec
CommitLineData
1891ddaa
JB
1#
2# Conditional build:
2749bbb7
JB
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
5
6Summary: Python 2 bindings for libcdio
7Summary(pl.UTF-8): Wiązania Pythona 2 do libcdio
180c8acb 8Name: python-pycdio
1891ddaa 9Version: 2.1.0
914c4ad6 10Release: 7
180c8acb
JB
11License: GPL v2+
12Group: Libraries/Python
1891ddaa
JB
13Source0: https://ftp.gnu.org/gnu/libcdio/pycdio-%{version}.tar.gz
14# Source0-md5: d1adcee07dc0f510a983547bf5046632
180c8acb 15URL: http://www.gnu.org/software/libcdio/
1891ddaa 16BuildRequires: libcdio-devel >= 2.0.0
d4c132c2 17BuildRequires: pkgconfig
7daadbb3
JB
18%if %{with python2}
19BuildRequires: python-devel >= 1:2.3.5
20BuildRequires: python-setuptools
21%endif
22%if %{with python3}
23BuildRequires: python3-devel >= 1:3.2
24BuildRequires: python3-setuptools
25%endif
180c8acb 26BuildRequires: rpm-pythonprov
2749bbb7
JB
27BuildRequires: rpmbuild(macros) >= 1.714
28BuildRequires: swig-python >= 3
8eacc6c2 29Requires: libcdio >= 2.0.0
2749bbb7 30Requires: python-libs >= 1:2.3.5
180c8acb
JB
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33%description
2749bbb7 34Python 2 bindings for libcdio.
180c8acb
JB
35
36%description -l pl.UTF-8
2749bbb7
JB
37Wiązania Pythona 2 do libcdio.
38
39%package -n python3-pycdio
40Summary: Python 3 bindings for libcdio
41Summary(pl.UTF-8): Wiązania Pythona 3 do libcdio
42Group: Libraries/Python
1891ddaa 43Requires: libcdio >= 2.0.0
2749bbb7
JB
44Requires: python3-libs >= 1:3.2
45
46%description -n python3-pycdio
47Python 3 bindings for libcdio.
48
49%description -n python3-pycdio -l pl.UTF-8
50Wiązania Pythona 3 do libcdio.
180c8acb
JB
51
52%package examples
53Summary: Example programs using Python libcdio bindings
54Summary(pl.UTF-8): Przykładowe programy w Pythonie używające libcdio
55Group: Libraries/Python
56Requires: %{name} = %{version}-%{release}
57
58%description examples
59Example programs using Python libcdio bindings.
60
61%description examples -l pl.UTF-8
62Przykładowe programy w Pythonie używające libcdio.
63
64%prep
65%setup -q -n pycdio-%{version}
66
31f82914
JP
67%{__sed} -i -e '1s,#!.*python,#!%{__python3},' example/*.py
68
180c8acb 69%build
2749bbb7 70%if %{with python2}
454d6e98 71%py_build
2749bbb7
JB
72%endif
73
74%if %{with python3}
75%py3_build
76%endif
180c8acb
JB
77
78%install
79rm -rf $RPM_BUILD_ROOT
80
2749bbb7 81%if %{with python2}
454d6e98 82%py_install
180c8acb 83
2749bbb7
JB
84%py_postclean
85%endif
86
87%if %{with python3}
88%py3_install
89%endif
90
180c8acb
JB
91install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
92install example/{*.py,README} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
93
180c8acb
JB
94%clean
95rm -rf $RPM_BUILD_ROOT
96
2749bbb7 97%if %{with python2}
180c8acb
JB
98%files
99%defattr(644,root,root,755)
8eacc6c2 100%doc ChangeLog README.rst THANKS
180c8acb
JB
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]
478403e3 107%{py_sitedir}/pycdio-%{version}-py*.egg-info
2749bbb7
JB
108%endif
109
110%if %{with python3}
111%files -n python3-pycdio
112%defattr(644,root,root,755)
8eacc6c2 113%doc ChangeLog README.rst THANKS
2749bbb7
JB
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
180c8acb
JB
126
127%files examples
128%defattr(644,root,root,755)
129%{_examplesdir}/%{name}-%{version}
This page took 0.257783 seconds and 4 git commands to generate.