forked from pool/python-jinja2-time
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-jinja2-time?expand=0&rev=10
72 lines
2.2 KiB
RPMSpec
72 lines
2.2 KiB
RPMSpec
#
|
|
# spec file for package python-jinja2-time
|
|
#
|
|
# Copyright (c) 2025 SUSE LLC
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%bcond_without test
|
|
%{?sle15_python_module_pythons}
|
|
Name: python-jinja2-time
|
|
Version: 0.2.0
|
|
Release: 0
|
|
Summary: Jinja2 Extension for Dates and Times
|
|
License: MIT
|
|
Group: Development/Languages/Python
|
|
URL: https://github.com/hackebrot/jinja2-time
|
|
Source: https://files.pythonhosted.org/packages/source/j/jinja2-time/jinja2-time-%{version}.tar.gz
|
|
BuildRequires: %{python_module pip}
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: %{python_module wheel}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
Requires: python-Jinja2
|
|
Requires: python-arrow
|
|
BuildArch: noarch
|
|
%if %{with test}
|
|
BuildRequires: %{python_module Jinja2}
|
|
BuildRequires: %{python_module arrow}
|
|
BuildRequires: %{python_module freezegun}
|
|
BuildRequires: %{python_module pytest}
|
|
%endif
|
|
%python_subpackages
|
|
|
|
%description
|
|
A Jinja2 extension providing support for dates and times.
|
|
|
|
%prep
|
|
%setup -q -n jinja2-time-%{version}
|
|
|
|
%build
|
|
%pyproject_wheel
|
|
|
|
%install
|
|
%pyproject_install
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%if %{with test}
|
|
%check
|
|
# gh#hackebrot/jinja2-time/pull/9 and https://github.com/hackebrot/jinja2-time#5
|
|
# There is something wrong with arrow. gh#hackebrot/jinja2-time#6
|
|
%pytest -k 'not (test_add_time or test_substract_time or test_offset_with_format)'
|
|
%endif
|
|
|
|
%files %{python_files}
|
|
%license LICENSE
|
|
%doc HISTORY.rst README.rst
|
|
%{python_sitelib}/jinja2[-_]time
|
|
%{python_sitelib}/jinja2[-_]time-%{version}*-info
|
|
|
|
%changelog
|