diff --git a/.gitignore b/.gitignore index 367e24f..65befbf 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /pyRFC3339-1.0.tar.gz +/coverhtml.patch diff --git a/python-pyrfc3339.spec b/python-pyrfc3339.spec index 1e83d62..6671861 100644 --- a/python-pyrfc3339.spec +++ b/python-pyrfc3339.spec @@ -1,4 +1,6 @@ %global srcname pyRFC3339 +%global __python /usr/bin/python +%global python2_sitelib /usr/lib/python2.6/site-packages Name: python-pyrfc3339 Version: 1.0 @@ -8,6 +10,7 @@ Summary: Generate and parse RFC 3339 timestamps License: MIT URL: https://pypi.python.org/pypi/pyRFC3339 Source0: https://pypi.python.org/packages/source/p/pyRFC3339/pyRFC3339-%{version}.tar.gz +Patch1: coverhtml.patch BuildArch: noarch BuildRequires: python2-devel @@ -15,11 +18,6 @@ BuildRequires: python2-devel BuildRequires: python-nose BuildRequires: pytz -BuildRequires: python3-devel -# --- unit tests --- -BuildRequires: python3-nose -BuildRequires: python3-pytz - %description This package contains a python library to parse and generate RFC 3339-compliant timestamps using Python datetime.datetime objects. @@ -32,46 +30,30 @@ Summary: %{summary} This package contains a Python 2 library to parse and generate RFC 3339-compliant timestamps using Python datetime.datetime objects. -%package -n python3-pyrfc3339 -Summary: Generate and parse RFC 3339 timestamps -%{?python_provide:%python_provide python3-pyrfc3339} - -%description -n python3-pyrfc3339 -This package contains a Python 3 library to parse and generate -RFC 3339-compliant timestamps using Python datetime.datetime objects. - - - %prep -%autosetup -n %{srcname}-%{version} +%setup -n %{srcname}-%{version} +%patch1 -p0 -b .coverhtml %build -%py2_build -%py3_build +CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build %install -%py2_install -%py3_install +%{__python} setup.py install --skip-build --root %{buildroot} %check -%{__python2} setup.py test -%{__python3} setup.py test +%{__python} setup.py test %files -n python2-pyrfc3339 %doc README.rst -%license LICENSE.txt +%doc LICENSE.txt %{python2_sitelib}/pyrfc3339 %{python2_sitelib}/%{srcname}-%{version}-*.egg-info -%files -n python3-pyrfc3339 -%doc README.rst -%license LICENSE.txt -%{python3_sitelib}/pyrfc3339 -%{python3_sitelib}/%{srcname}-%{version}-*.egg-info - %changelog +* Fri Dec 04 2015 Nick Le Mouton - 1.0-1 +- Adding to EL * Tue Nov 10 2015 James Hogarth - 1.0-1 - Add installed tests back as per review - Update to new 1.0 PyPi release diff --git a/sources b/sources index d5a585d..347bcff 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ 0f7edd7ffd756a582eeef9282fecb60d pyRFC3339-1.0.tar.gz +c026c247afd0d309cf604e9b1e04c458 coverhtml.patch