Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-release-src > by-pkgid > 30746ef25501838c94f2547836b824c1 > files > 1

python-xlrd-0.9.2-7.mga6.src.rpm

# Created by pyp2rpm-1.0.1
%global pypi_name xlrd
%global with_python3 1

Name:           python-xlrd
Version:        0.9.2
Release:        %mkrel 7
Group:          Development/Python
Summary:        Library for developers to extract data from Microsoft Excel (tm) spreadsheet files

License:        BSD
Source0:        https://pypi.python.org/packages/source/x/xlrd/xlrd-%{version}.tar.gz
BuildArch:      noarch
 
BuildRequires:  python-devel
 
%if %{?with_python3}
BuildRequires:  python3-devel
%endif # if with_python3


%description
Extract data from Excel spreadsheets (.xls and .xlsx, versions 2.0 onwards) on
any platform. Pure Python (2.6, 2.7, 3.2+). Strong support for Excel dates.
Unicode-aware.

%if 0%{?with_python3}
%package -n     python3-%{pypi_name}
Summary:        Library for developers to extract data from Microsoft Excel (tm) spreadsheet files


%description -n python3-%{pypi_name}
Extract data from Excel spreadsheets (.xls and .xlsx, versions 2.0 onwards) on
any platform. Pure Python (2.6, 2.7, 3.2+). Strong support for Excel dates.
Unicode-aware.
%endif # with_python3


%prep
%setup -q -n %{pypi_name}-%{version}


%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'

%endif # with_python3


%build
%{__python} setup.py build

%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
%endif # with_python3


%install
# Must do the subpackages' install first because the scripts in /usr/bin are
# overwritten with every setup.py install (and we want the python2 version
# to be the default for now).
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install --skip-build --root %{buildroot}
mv %{buildroot}%{_bindir}/runxlrd.py %{buildroot}/%{_bindir}/python3-runxlrd.py
popd
%endif # with_python3

%{__python} setup.py install --skip-build --root %{buildroot}


%files
%doc README.html
%{_bindir}/runxlrd.py
%{python_sitelib}/%{pypi_name}
%{python_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%if 0%{?with_python3}
%files -n python3-%{pypi_name}
%doc README.html
%{_bindir}/python3-runxlrd.py
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%endif # with_python3



%changelog
* Fri Feb 19 2016 umeabot <umeabot> 0.9.2-7.mga6
+ Revision: 970625
- Mageia 6 Mass Rebuild

* Wed Oct 15 2014 umeabot <umeabot> 0.9.2-6.mga6
+ Revision: 739117
- Second Mageia 5 Mass Rebuild

* Sat Sep 27 2014 tv <tv> 0.9.2-5.mga5
+ Revision: 730017
- rebuild for missing pythoneggs deps

* Tue Sep 16 2014 umeabot <umeabot> 0.9.2-4.mga5
+ Revision: 688432
- Mageia 5 Mass Rebuild

* Sat May 31 2014 pterjan <pterjan> 0.9.2-3.mga5
+ Revision: 629110
- Rebuild for new Python

* Wed Jan 08 2014 joequant <joequant> 0.9.2-2.mga4
+ Revision: 565567
- push to core/release

* Sat Jan 04 2014 joequant <joequant> 0.9.2-1.mga4
+ Revision: 564557
- imported package python-xlrd