Blob Blame History Raw
%global upstream_name ofxparse

%if 0%{?fedora} || 0%{?rhel} >= 8
%bcond_without python3
%else
%bcond_with python3
%endif

Name:           python-%{upstream_name}
Version:        0.16
Release:        1%{?dist}
Summary:        Python library for working with the OFX (Open Financial Exchange) file format
License:        MIT
URL:            http://sites.google.com/site/ofxparse
Source0:        https://files.pythonhosted.org/packages/source/o/%{upstream_name}/%{upstream_name}-%{version}.tar.gz
BuildArch:      noarch

%description
ofxparse is a parser for Open Financial Exchange (.ofx) format files. OFX files 
are available from almost any online banking site, so they work well if you 
want to pull together your finances from multiple sources. Online trading 
accounts also provide account statements in OFX files.

%package -n python2-%{upstream_name}
Summary:        %{summary}
%{?python_provide:%python_provide python2-%{upstream_name}}
BuildRequires:  python2-devel
BuildRequires:  python-setuptools
BuildRequires:  python-nose
BuildRequires:  python-beautifulsoup4
BuildRequires:  python-six
BuildRequires:  python-lxml
Requires:       python-beautifulsoup4
Requires:       python-six
Requires:       python-lxml

%description -n python2-%{upstream_name}
ofxparse is a parser for Open Financial Exchange (.ofx) format files. OFX files 
are available from almost any online banking site, so they work well if you 
want to pull together your finances from multiple sources. Online trading 
accounts also provide account statements in OFX files.

%if %{with python3}
%package -n python3-%{upstream_name}
Summary:        %{summary}
%{?python_provide:%python_provide python3-%{upstream_name}}
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-nose
BuildRequires:  python3-beautifulsoup4
BuildRequires:  python3-six
BuildRequires:  python3-lxml
Requires:       python3-beautifulsoup4
Requires:       python3-six
Requires:       python3-lxml

%description -n python3-%{upstream_name}
ofxparse is a parser for Open Financial Exchange (.ofx) format files. OFX files 
are available from almost any online banking site, so they work well if you 
want to pull together your finances from multiple sources. Online trading 
accounts also provide account statements in OFX files.
%endif # with python3

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

%build
%py2_build
%if %{with python3}
%py3_build
%endif # with python3

%install
%py2_install
%if %{with python3}
%py3_install
%endif # with python3

%check
%{__python2} setup.py test
%if %{with python3}
%{__python3} setup.py test
%endif # with python3

%files -n python2-%{upstream_name}
%license LICENSE
%doc README.rst AUTHORS
%{python2_sitelib}/%{upstream_name}
%{python2_sitelib}/%{upstream_name}*.egg-info

%if %{with python3}
%files -n python3-%{upstream_name}
%license LICENSE
%doc README.rst AUTHORS
%{python3_sitelib}/%{upstream_name}
%{python3_sitelib}/%{upstream_name}*.egg-info
%endif # with python3

%changelog
* Thu Jan 05 2017 Dan Callaghan <dcallagh@redhat.com> - 0.16-1
- upstream release 0.16

* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.15-5
- Rebuild for Python 3.6

* Sat Oct 08 2016 Björn Esser <fedora@besser82.io> - 0.15-4
- add needed BuildRequires and Requires
- fix BuildRequires for epel7

* Sat Oct 08 2016 Björn Esser <fedora@besser82.io> - 0.15-3
- add conditional for Python3 to build on epel7
- do not remove upstream egg-info

* Mon Aug 01 2016 Dan Callaghan <dcallagh@redhat.com> - 0.15-2
- updated to latest Python guidelines

* Mon Aug 01 2016 Dan Callaghan <dcallagh@redhat.com> - 0.15-1
- upstream release 0.15

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.14-8
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.14-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.14-6
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.14-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.14-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 0.14-3
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4

* Tue Jan 07 2014 Dan Callaghan <dcallagh@redhat.com> - 0.14-2
- six is needed on Python 2 also

* Fri Dec 27 2013 Dan Callaghan <dcallagh@redhat.com> - 0.14-1
- upstream release 0.14

* Wed Aug 14 2013 Dan Callaghan <dcallagh@redhat.com> - 0.12-1
- initial version