04b202f
%global pypi_name pytimeparse
04b202f
67cf00e
%if 0%{?fedora}
67cf00e
%bcond_without python3
67cf00e
%else
67cf00e
%bcond_with python3
67cf00e
%endif
67cf00e
67cf00e
%if 0%{?fedora} && 0%{?fedora} >= 30
67cf00e
%bcond_with python2
67cf00e
%else
67cf00e
%bcond_without python2
67cf00e
%endif
67cf00e
67cf00e
Name:           python-%{pypi_name}
67cf00e
Version:        1.1.8
a01ad57
Release:        3%{?dist}
67cf00e
Summary:        Time expression parser
67cf00e
cd02706
License:        MIT
67cf00e
URL:            https://github.com/wroberts/%{pypi_name}
67cf00e
Source0:        %{pypi_source}
04b202f
BuildArch:      noarch
04b202f
67cf00e
%if %{with python2}
67cf00e
BuildRequires:  python2-devel
67cf00e
BuildRequires:  python2-nose
67cf00e
BuildRequires:  python2-setuptools
67cf00e
%endif
5528128
67cf00e
%if %{with python3}
67cf00e
BuildRequires:  python3-devel
67cf00e
BuildRequires:  python3dist(nose)
67cf00e
BuildRequires:  python3dist(setuptools)
67cf00e
%endif
5528128
67cf00e
%description
67cf00e
A small Python module to parse various kinds of time expressions.
04b202f
67cf00e
%if %{with python2}
67cf00e
%package -n     python2-%{pypi_name}
67cf00e
Summary:        %{summary}
67cf00e
%{?python_provide:%python_provide python2-%{pypi_name}}
5528128
67cf00e
%description -n python2-%{pypi_name}
67cf00e
A small Python module to parse various kinds of time expressions.
5528128
67cf00e
This is the Python 2 version of the package.
67cf00e
%endif
67cf00e
67cf00e
%if %{with python3}
67cf00e
%package -n     python3-%{pypi_name}
67cf00e
Summary:        %{summary}
67cf00e
%{?python_provide:%python_provide python3-%{pypi_name}}
67cf00e
67cf00e
%description -n python3-%{pypi_name}
67cf00e
A small Python module to parse various kinds of time expressions.
67cf00e
67cf00e
This is the Python 3 version of the package.
67cf00e
%endif
04b202f
04b202f
%prep
67cf00e
%autosetup -n %{pypi_name}-%{version}
67cf00e
# Remove bundled egg-info
67cf00e
rm -rf %{pypi_name}.egg-info
67cf00e
67cf00e
# Remove shebangs from Python scripts
67cf00e
find . -name '*.py' -exec sed -i '1 { /^#!/ d }' {} \+
04b202f
04b202f
%build
67cf00e
%if %{with python2}
67cf00e
%py2_build
67cf00e
%endif
04b202f
67cf00e
%if %{with python3}
67cf00e
%py3_build
67cf00e
%endif
04b202f
04b202f
%install
67cf00e
%if %{with python2}
67cf00e
%py2_install
67cf00e
%endif
67cf00e
67cf00e
%if %{with python3}
cd02706
%py3_install
67cf00e
%endif
04b202f
67cf00e
%check
67cf00e
%if %{with python2}
67cf00e
%{__python2} setup.py test
67cf00e
%endif
67cf00e
67cf00e
%if %{with python3}
67cf00e
%{__python3} setup.py test
67cf00e
%endif
67cf00e
67cf00e
%if %{with python2}
67cf00e
%files -n python2-%{pypi_name}
67cf00e
%license LICENSE.rst
04b202f
%doc README.rst
67cf00e
%{python2_sitelib}/%{pypi_name}
67cf00e
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
67cf00e
%endif
04b202f
67cf00e
%if %{with python3}
67cf00e
%files -n python3-%{pypi_name}
67cf00e
%license LICENSE.rst
67cf00e
%doc README.rst
67cf00e
%{python3_sitelib}/%{pypi_name}
67cf00e
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
67cf00e
%endif
04b202f
04b202f
%changelog
a01ad57
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.1.8-3
a01ad57
- Rebuilt for Python 3.8
a01ad57
f895f6a
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.8-2
f895f6a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
f895f6a
67cf00e
* Mon Mar 11 2019 Eli Young <elyscape@gmail.com> - 1.1.8-1
67cf00e
- Update to 1.1.8
67cf00e
9e7e285
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.5-15
9e7e285
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
9e7e285
8404ae0
* Mon Jan 14 2019 Miro Hrončok <mhroncok@redhat.com> - 1.1.5-14
8404ae0
- Subpackage python2-pytimeparse has been removed
8404ae0
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
8404ae0
fe5cd28
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.5-13
fe5cd28
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
fe5cd28
f146d57
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.1.5-12
f146d57
- Rebuilt for Python 3.7
f146d57
7267778
* Fri Feb 09 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.1.5-11
7267778
- Update Python 2 dependency declarations to new packaging standards
7267778
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
7267778
8c7ebb2
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.5-10
8c7ebb2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
8c7ebb2
75503db
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.5-9
75503db
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
75503db
fb369be
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.5-8
fb369be
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
fb369be
6699e4b
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.1.5-7
6699e4b
- Rebuild for Python 3.6
6699e4b
9fa4038
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.5-6
9fa4038
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
9fa4038
5528128
* Fri Jun 17 2016 Pradeep Kilambi <pkilambi@redhat.com> - 1.1.5-5
5528128
- Add support so we build both py2 and py3
5528128
cd02706
* Fri Apr 08 2016 Dominika Krejci <dkrejci@redhat.com> - 1.1.5-4
cd02706
- Remove unnecessary shebang lines
cd02706
cd02706
* Mon Feb 08 2016 Matej Dujava <mdujava@redhat.com> - 1.1.5-3
cd02706
- Add python3
cd02706
f6c537f
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.5-2
f6c537f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
f6c537f
4bcae73
* Tue Aug 04 2015 Pradeep Kilambi <pkilambi@redhat.com> - 1.1.5-1
4bcae73
- new version build
4bcae73
6efc4bb
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.4-2
6efc4bb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
6efc4bb
04b202f
* Tue May 05 2015 Pradeep Kilambi <pkilambi@redhat.com> 1.1.4
04b202f
- initial package release
04b202f