Blob Blame History Raw
%bcond_without tests

%global pretty_name snaptime
%global commit          cc8b7d4489ee8104b717ed461dd21aee806ae322
%global snapshotdate    20210420
%global shortcommit     %(c=%{commit}; echo ${c:0:7})

%global _description %{expand:
The snaptime package is about transforming timestamps simply.}

Name:           python-%{pretty_name}
Version:        0.2.4
Release:        5%{?dist}
Summary:        Transforming timestamps simply

License:        MIT
Source0:        %{url}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz

BuildArch:      noarch

%description %_description

%package -n python3-%{pretty_name}
Summary:        %{summary}
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-pytz
BuildRequires:  python3-dateutil

%if %{with tests}
BuildRequires:  python3-pytest
BuildRequires:  python3-pytest-cov

%description -n python3-%{pretty_name} %_description

%autosetup -n %{pretty_name}-%{commit}



#skipping three tests
%if %{with tests}
%{python3} -m pytest -k 'not test_bad_weekday and not test_parse_error and not test_unit_error'

%files -n python3-%{pretty_name}
%license LICENSE.txt
%pycached %{python3_sitelib}/%{pretty_name}/
%pycached %{python3_sitelib}/%{pretty_name}/

* Fri Jun 04 2021 Python Maint <> - 0.2.4-5
- Rebuilt for Python 3.10

* Tue Apr 20 15:11:26 CEST 2021 Robert-André Mauchin <> - 0.2.4-4
- Target a specific commit instead of the master git tip

* Wed Mar 17 2021 Iztok Fister Jr. <iztokf AT fedoraproject DOT org> - 0.2.4-3
- Cosmetic changes

* Wed Jan 27 2021 Fedora Release Engineering <> - 0.2.4-2
- Rebuilt for

* Thu Jan 21 2021 Iztok Fister Jr. <iztokf AT fedoraproject DOT org> - 0.2.4-1
- Initial package