diff --git a/python-ofxparse.spec b/python-ofxparse.spec index 1dea7e6..0495adf 100644 --- a/python-ofxparse.spec +++ b/python-ofxparse.spec @@ -1,45 +1,45 @@ %global upstream_name ofxparse -%if 0%{?fedora} -%bcond_without python3 -%else -%bcond_with python3 -%{!?__python2: %global __python2 %{__python}} -%{!?python2_sitelib: %global python2_sitelib %{python_sitelib}} -%endif - Name: python-%{upstream_name} Version: 0.15 -Release: 1%{?dist} +Release: 2%{?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: python2-setuptools +BuildRequires: python2-nose BuildRequires: python-beautifulsoup4 BuildRequires: python-six -%if %{with python3} -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-nose -BuildRequires: python3-beautifulsoup4 -BuildRequires: python3-six -%endif -Requires: python-six Requires: python-beautifulsoup4 +Requires: python-six -%description +%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: Python 3 library for working with the OFX (Open Financial Exchange) file format +Summary: %{summary} +%{?python_provide:%python_provide python3-%{upstream_name}} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-nose +BuildRequires: python3-beautifulsoup4 +BuildRequires: python3-six Requires: python3-beautifulsoup4 Requires: python3-six @@ -48,60 +48,42 @@ 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 %prep %setup -q -n %{upstream_name}-%{version} rm -rf %{upstream_name}.egg-info -%if %{with python3} -rm -rf %{py3dir} -cp -a . %{py3dir} -%endif - %build -%{__python2} setup.py build - -%if %{with python3} -pushd %{py3dir} -%{__python3} setup.py build -popd -%endif +%py2_build +%py3_build %install -%if %{with python3} -pushd %{py3dir} -%{__python3} setup.py install --skip-build --root %{buildroot} -popd -%endif - -%{__python2} setup.py install --skip-build --root %{buildroot} +%py2_install +%py3_install %check # Tests are currently failing (just suncorp.ofx in the default configuration), # seems to be some kind of BeautifulSoup deficiency: # https://github.com/jseutter/ofxparse/issues/107 %{__python2} setup.py test || : - -%if %{with python3} -pushd %{py3dir} %{__python3} setup.py test || : -popd -%endif -%files -%doc README.rst AUTHORS LICENSE +%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} -%doc README.rst AUTHORS LICENSE +%license LICENSE +%doc README.rst AUTHORS %{python3_sitelib}/%{upstream_name} %{python3_sitelib}/%{upstream_name}*.egg-info -%endif %changelog +* Mon Aug 01 2016 Dan Callaghan - 0.15-2 +- updated to latest Python guidelines + * Mon Aug 01 2016 Dan Callaghan - 0.15-1 - upstream release 0.15