Blob Blame History Raw
%global pypi_name dbf
%global sum Pure python package for reading/writing dBase, FoxPro, and Visual FoxPro .dbf
%global desc Pure python package for reading/writing dBase, FoxPro, and Visual FoxPro .dbf\
files (including memos)\
\
Currently supports dBase III, Clipper, FoxPro, and Visual FoxPro tables. Text is\
returned as unicode, and codepage settings in tables are honored. Memos and Null\
fields are supported.

Name:           python-%{pypi_name}
Version:        0.96.005
Release:        1%{?dist}
Summary:        %{sum}

License:        BSD
URL:            https://pypi.python.org/pypi/%{pypi_name}
Source0:        https://pypi.python.org/packages/source/d/%{pypi_name}/%{pypi_name}-%{version}.tar.gz

BuildArch:      noarch

%description
%{desc}

%package -n     python2-%{pypi_name}
BuildRequires:  python2-devel
Summary:        %{sum}
%{?python_provide:%python_provide python2-%{pypi_name}}

%description -n python2-%{pypi_name}
%{desc}


%package -n     python3-%{pypi_name}
Summary:        %{sum}
BuildRequires:  python3-devel
BuildRequires:  python-tools
%{?python_provide:%python_provide python3-%{pypi_name}}

%description -n python3-%{pypi_name}
%{desc}


%prep
%setup -qc
mv %{pypi_name}-%{version} python2
pushd python2
rm -rf *.egg-info
rm -f dfb/ver_32.py
sed -i "s|\r||g" dbf/README.md
popd

cp -a python2 python3
pushd python3
rm -f dbf/ver_2.py
popd

pushd python2
rm -f dbf/ver_33.py
popd


%build
pushd python2
%py2_build
popd

pushd python3
%py3_build
popd


%install
pushd python2
%py2_install
popd

pushd python3
%py3_install
popd


%files -n python2-%{pypi_name}
%doc python2/dbf/README.md
%{python2_sitelib}/%{pypi_name}-%{version}-py%{python2_version}.egg-info
%{python2_sitelib}/%{pypi_name}/

%files -n python3-%{pypi_name}
%doc python3/dbf/README.md
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
%{python3_sitelib}/%{pypi_name}/

%changelog
* Mon Nov 9 2015 Julien Enselme <jujens@jujens.eu> - 0.96.005-1
- Inital package