diff --git a/python-parsedatetime.spec b/python-parsedatetime.spec new file mode 100644 index 0000000..2cb9619 --- /dev/null +++ b/python-parsedatetime.spec @@ -0,0 +1,66 @@ +%global realname parsedatetime +%global py3_prefix python%{python3_pkgversion} + + +%bcond_without tests + +Name: python-%{realname} +Version: 2.5 +Release: 1%{?dist} +Summary: Parse human-readable date/time strings in Python + +License: ASL 2.0 +URL: https://github.com/bear/%{realname} +Source0: https://github.com/bear/%{realname}/archive/v%{version}.tar.gz#/%{realname}-%{version}.tar.gz + +BuildArch: noarch +BuildRequires: %{py3_prefix}-devel +BuildRequires: %{py3_prefix}-setuptools +%if %{with tests} +BuildRequires: %{py3_prefix}-pytest +%endif + +%global _description\ +parsedatetime is a python module that can parse human-readable date/time\ +strings. + +%description %_description + +%package -n %{py3_prefix}-%{realname} +Summary: Parse human-readable date/time strings in Python +%{?python_provide:%python_provide %{py3_prefix}-%{realname}} + + +%description -n %{py3_prefix}-%{realname} +parsedatetime is a python module that can parse human-readable date/time +strings. + +%prep +%setup -q -n %{realname}-%{version} + + +%build +%py3_build + + +%install +%py3_install +# It makes no sense to ship all these tests in the package +# just use them during the build +rm -rf %{buildroot}%{python3_sitelib}/%{realname}/tests + +%check +%if %{with tests} +py.test-3 -x tests/*.py +%endif + +%files -n %{py3_prefix}-%{realname} +%license LICENSE.txt +%doc AUTHORS.txt CHANGES.txt README.rst +%{python3_sitelib}/%{realname} +%{python3_sitelib}/%{realname}*.egg-info + +%changelog +* Mon Dec 02 2019 Felix Schwarz 2.5-1 +- initial package for EPEL 8 + diff --git a/sources b/sources index e69de29..c37fa4a 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +SHA512 (parsedatetime-2.5.tar.gz) = f729c32a3e5ee94fe39322be4772dffacb0608753e106e64d79818a6be3febc36f37e0eeac73190f1510f5e88aa0755eb0fb85fab19aa53f4643619907b245bf