]> git.pld-linux.org Git - packages/python-xlrd.git/blame - python-xlrd.spec
- cleanup (no CFLAGS in noarch package); unify and simplify
[packages/python-xlrd.git] / python-xlrd.spec
CommitLineData
6a3c7823 1%define module xlrd
d89fc661 2Summary: Python interface to extracting data from Excel datasheets
3Summary(pl.UTF-8): Pythonowy interfejs do odczytywania danych z arkuszy Excela
4Name: python-%{module}
4c36fcbe 5Version: 0.7.9
f47e00f7 6Release: 1
d89fc661 7License: BSD-style
8Group: Development/Languages/Python
f47e00f7 9Source0: http://pypi.python.org/packages/source/x/xlrd/%{module}-%{version}.tar.gz
4c36fcbe 10# Source0-md5: 8e6833676d78ef65515481952eb0fd76
d89fc661 11URL: http://www.lexicon.net/sjmachin/xlrd.htm
12BuildRequires: python-devel
13BuildRequires: rpm-pythonprov
14BuildRequires: rpmbuild(macros) >= 1.219
15BuildArch: noarch
16BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
18%description
19Python interface to extracting data from Excel datasheets
20
21%description -l pl.UTF-8
22Pythonowy 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
31rm -rf $RPM_BUILD_ROOT
32%{__python} setup.py install \
33 --optimize=2 \
34 --root=$RPM_BUILD_ROOT
35
6a3c7823
ER
36install -d $RPM_BUILD_ROOT{%{_datadir}/%{name},%{_examplesdir}/%{name}-%{version}}
37cp -p xlrd/examples/namesdemo.xls $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
38cp -p xlrd/examples/xlrdnameAPIdemo.py $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
39cp -p scripts/runxlrd.py $RPM_BUILD_ROOT%{_bindir}
4c36fcbe 40mv $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 48cat > $RPM_BUILD_ROOT%{_bindir}/runxlrd <<-EOF
4c36fcbe 49#!/bin/sh
6a3c7823 50%{__python} %{_datadir}/%{name}/runxlrd.pyc "$@"
4c36fcbe
AF
51EOF
52chmod a+x $RPM_BUILD_ROOT%{_bindir}/runxlrd
d89fc661 53
54%clean
55rm -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
This page took 0.069312 seconds and 4 git commands to generate.