]>
Commit | Line | Data |
---|---|---|
6a3c7823 | 1 | %define module xlrd |
d89fc661 | 2 | Summary: Python interface to extracting data from Excel datasheets |
3 | Summary(pl.UTF-8): Pythonowy interfejs do odczytywania danych z arkuszy Excela | |
4 | Name: python-%{module} | |
4c36fcbe | 5 | Version: 0.7.9 |
f47e00f7 | 6 | Release: 1 |
d89fc661 | 7 | License: BSD-style |
8 | Group: Development/Languages/Python | |
f47e00f7 | 9 | Source0: http://pypi.python.org/packages/source/x/xlrd/%{module}-%{version}.tar.gz |
4c36fcbe | 10 | # Source0-md5: 8e6833676d78ef65515481952eb0fd76 |
d89fc661 | 11 | URL: http://www.lexicon.net/sjmachin/xlrd.htm |
12 | BuildRequires: python-devel | |
13 | BuildRequires: rpm-pythonprov | |
14 | BuildRequires: rpmbuild(macros) >= 1.219 | |
15 | BuildArch: noarch | |
16 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
17 | ||
18 | %description | |
19 | Python interface to extracting data from Excel datasheets | |
20 | ||
21 | %description -l pl.UTF-8 | |
22 | Pythonowy interfejs do odczytywania danych z arkuszy Excela | |
23 | ||
24 | %prep | |
25 | %setup -q -n %{module}-%{version} | |
26 | ||
27 | %build | |
d89fc661 | 28 | %{__python} setup.py build |
29 | ||
30 | %install | |
31 | rm -rf $RPM_BUILD_ROOT | |
32 | %{__python} setup.py install \ | |
33 | --optimize=2 \ | |
34 | --root=$RPM_BUILD_ROOT | |
35 | ||
6a3c7823 ER |
36 | install -d $RPM_BUILD_ROOT{%{_datadir}/%{name},%{_examplesdir}/%{name}-%{version}} |
37 | cp -p xlrd/examples/namesdemo.xls $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
38 | cp -p xlrd/examples/xlrdnameAPIdemo.py $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
39 | cp -p scripts/runxlrd.py $RPM_BUILD_ROOT%{_bindir} | |
4c36fcbe | 40 | mv $RPM_BUILD_ROOT%{_bindir}/runxlrd.py $RPM_BUILD_ROOT%{_datadir}/%{name} |
d89fc661 | 41 | %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir} |
42 | %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir} | |
4c36fcbe | 43 | %py_comp $RPM_BUILD_ROOT%{_datadir}/%{name} |
d89fc661 | 44 | %py_postclean |
4c36fcbe AF |
45 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/%{name}/runxlrd.py \ |
46 | $RPM_BUILD_ROOT%{py_sitescriptdir}/xlrd/{examples,doc} | |
47 | ||
6a3c7823 | 48 | cat > $RPM_BUILD_ROOT%{_bindir}/runxlrd <<-EOF |
4c36fcbe | 49 | #!/bin/sh |
6a3c7823 | 50 | %{__python} %{_datadir}/%{name}/runxlrd.pyc "$@" |
4c36fcbe AF |
51 | EOF |
52 | chmod a+x $RPM_BUILD_ROOT%{_bindir}/runxlrd | |
d89fc661 | 53 | |
54 | %clean | |
55 | rm -rf $RPM_BUILD_ROOT | |
56 | ||
57 | %files | |
58 | %defattr(644,root,root,755) | |
f47e00f7 | 59 | %doc xlrd/doc/compdoc.html xlrd/doc/xlrd.html |
959a8254 | 60 | %dir %{py_sitescriptdir}/%{module} |
d89fc661 | 61 | %{py_sitescriptdir}/%{module}/*.py[co] |
62 | %{_examplesdir}/%{name}-%{version} | |
4c36fcbe AF |
63 | %{_datadir}/%{name}/runxlrd.pyc |
64 | %attr(755,root,root) %{_bindir}/runxlrd | |
d89fc661 | 65 | %if "%{py_ver}" > "2.4" |
66 | %{py_sitescriptdir}/%{module}-*.egg-info | |
67 | %endif |