3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
7 Summary: Python interface to extracting data from Excel datasheets
8 Summary(pl.UTF-8): Pythonowy interfejs do odczytywania danych z arkuszy Excela
13 Group: Development/Languages/Python
14 Source0: https://files.pythonhosted.org/packages/source/x/xlrd/%{module}-%{version}.tar.gz
15 # Source0-md5: ae3f951c857a490d432f0a7d722352bf
16 URL: https://www.python-excel.org/
18 BuildRequires: python-modules >= 1:2.7
19 BuildRequires: python-setuptools
22 BuildRequires: python3-modules >= 1:3.6
23 BuildRequires: python3-setuptools
25 BuildRequires: rpm-pythonprov
26 BuildRequires: rpmbuild(macros) >= 1.714
27 Requires: python-modules >= 1:2.7
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 Python interface to extracting data from Excel datasheets
34 %description -l pl.UTF-8
35 Pythonowy interfejs do odczytywania danych z arkuszy Excela
37 %package -n python3-%{module}
38 Summary: Python interface to extracting data from Excel datasheets
39 Summary(pl.UTF-8): Pythonowy interfejs do odczytywania danych z arkuszy Excela
40 Requires: python3-modules >= 1:3.6
42 %description -n python3-%{module}
43 Python interface to extracting data from Excel datasheets
45 %description -n python3-%{module} -l pl.UTF-8
46 Pythonowy interfejs do odczytywania danych z arkuszy Excela
49 %setup -q -n %{module}-%{version}
61 rm -rf $RPM_BUILD_ROOT
66 %{!?with_python3:%{__sed} -i -e 's|/usr/bin/env python|%{__python}|' $RPM_BUILD_ROOT%{_bindir}/runxlrd.py}
71 %{__sed} -i -e 's|/usr/bin/env python|%{__python3}|' $RPM_BUILD_ROOT%{_bindir}/runxlrd.py
74 %{__mv} $RPM_BUILD_ROOT%{_bindir}/runxlrd{.py,}
78 rm -rf $RPM_BUILD_ROOT
82 %defattr(644,root,root,755)
83 %{py_sitescriptdir}/%{module}
84 %if %{without python3}
85 %attr(755,root,root) %{_bindir}/runxlrd
87 %{py_sitescriptdir}/%{module}-*.egg-info
91 %files -n python3-%{module}
92 %defattr(644,root,root,755)
93 %{py3_sitescriptdir}/%{module}
94 %attr(755,root,root) %{_bindir}/runxlrd
95 %{py3_sitescriptdir}/%{module}-*.egg-info