]> git.pld-linux.org Git - packages/python-xlrd.git/blame - python-xlrd.spec
rebuild with python 3.10
[packages/python-xlrd.git] / python-xlrd.spec
CommitLineData
fb7d7565
JP
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
5
6a3c7823 6%define module xlrd
d89fc661 7Summary: Python interface to extracting data from Excel datasheets
8Summary(pl.UTF-8): Pythonowy interfejs do odczytywania danych z arkuszy Excela
9Name: python-%{module}
fb7d7565 10Version: 2.0.1
c3a135b4 11Release: 3
d89fc661 12License: BSD-style
13Group: Development/Languages/Python
fb7d7565
JP
14Source0: https://files.pythonhosted.org/packages/source/x/xlrd/%{module}-%{version}.tar.gz
15# Source0-md5: ae3f951c857a490d432f0a7d722352bf
16URL: https://www.python-excel.org/
17%if %{with python2}
18BuildRequires: python-modules >= 1:2.7
19BuildRequires: python-setuptools
20%endif
21%if %{with python3}
22BuildRequires: python3-modules >= 1:3.6
23BuildRequires: python3-setuptools
24%endif
d89fc661 25BuildRequires: rpm-pythonprov
fb7d7565
JP
26BuildRequires: rpmbuild(macros) >= 1.714
27Requires: python-modules >= 1:2.7
d89fc661 28BuildArch: noarch
29BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31%description
32Python interface to extracting data from Excel datasheets
33
34%description -l pl.UTF-8
35Pythonowy interfejs do odczytywania danych z arkuszy Excela
36
fb7d7565
JP
37%package -n python3-%{module}
38Summary: Python interface to extracting data from Excel datasheets
39Summary(pl.UTF-8): Pythonowy interfejs do odczytywania danych z arkuszy Excela
40Requires: python3-modules >= 1:3.6
41
42%description -n python3-%{module}
43Python interface to extracting data from Excel datasheets
44
45%description -n python3-%{module} -l pl.UTF-8
46Pythonowy interfejs do odczytywania danych z arkuszy Excela
47
d89fc661 48%prep
49%setup -q -n %{module}-%{version}
50
51%build
fb7d7565 52%if %{with python2}
59f958a3 53%py_build
fb7d7565
JP
54%endif
55
56%if %{with python3}
57%py3_build
58%endif
d89fc661 59
60%install
61rm -rf $RPM_BUILD_ROOT
d85c4416 62
fb7d7565 63%if %{with python2}
59f958a3 64%py_install
fb7d7565
JP
65%py_postclean
66%{__sed} -i -e 's|/usr/bin/env python|%{__python}|' $RPM_BUILD_ROOT%{_bindir}/runxlrd.py
67%endif
68
69%if %{with python3}
70%py3_install
71%{__sed} -i -e 's|/usr/bin/env python|%{__python3}|' $RPM_BUILD_ROOT%{_bindir}/runxlrd.py
72%endif
d89fc661 73
d85c4416 74%{__mv} $RPM_BUILD_ROOT%{_bindir}/runxlrd{.py,}
d85c4416 75
4c36fcbe 76
d89fc661 77%clean
78rm -rf $RPM_BUILD_ROOT
79
fb7d7565 80%if %{with python2}
d89fc661 81%files
82%defattr(644,root,root,755)
fb7d7565
JP
83%{py_sitescriptdir}/%{module}
84%if %{without python3}
4c36fcbe 85%attr(755,root,root) %{_bindir}/runxlrd
fb7d7565 86%endif
d89fc661 87%{py_sitescriptdir}/%{module}-*.egg-info
88%endif
fb7d7565
JP
89
90%if %{with python3}
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
96%endif
This page took 0.486389 seconds and 4 git commands to generate.