14
0

Accepting request 796109 from devel:languages:python

- Cleanup of the SPEC file, remove warnings.

OBS-URL: https://build.opensuse.org/request/show/796109
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-Cheetah3?expand=0&rev=10
This commit is contained in:
2020-04-22 18:55:13 +00:00
committed by Git OBS Bridge
2 changed files with 27 additions and 17 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Apr 21 17:05:55 UTC 2020 - Matej Cepl <mcepl@suse.com>
- Cleanup of the SPEC file, remove warnings.
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Feb 14 11:31:46 UTC 2020 - trenn@suse.de Fri Feb 14 11:31:46 UTC 2020 - trenn@suse.de

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-Cheetah3 # spec file for package python-Cheetah3
# #
# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2020 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -16,7 +16,7 @@
# #
%define skip_python2 1 %define modname Cheetah3
%{?!python_module:%define python_module() python-%{**} python3-%{**}} %{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-Cheetah3 Name: python-Cheetah3
Version: 3.2.4 Version: 3.2.4
@@ -24,7 +24,7 @@ Release: 0
Summary: Template engine and code generation tool Summary: Template engine and code generation tool
License: MIT License: MIT
Group: Development/Languages/Python Group: Development/Languages/Python
URL: http://cheetahtemplate.org/ URL: https://cheetahtemplate.org/
Source: https://files.pythonhosted.org/packages/source/C/Cheetah3/Cheetah3-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/C/Cheetah3/Cheetah3-%{version}.tar.gz
BuildRequires: %{python_module Markdown} BuildRequires: %{python_module Markdown}
BuildRequires: %{python_module Pygments} BuildRequires: %{python_module Pygments}
@@ -33,41 +33,46 @@ BuildRequires: %{python_module setuptools}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Conflicts: python-Cheetah Conflicts: python-Cheetah
%ifpython3 Provides: python-Cheetah = %{version}
Provides: Cheetah3 = %{version} Provides: python-cheetah = %{version}
%endif Obsoletes: python-Cheetah < %{version}
%python_subpackages %python_subpackages
%description %description
Cheetah3 is a template engine and code generation tool. Cheetah is an open source template engine and code generation tool.
It can be used standalone or combined with other tools and frameworks. Web It can be used standalone or combined with other tools and frameworks.
development is its principle use, but Cheetah is flexible and can also be Web development is its principle use, but Cheetah is flexible and can
used to generate C++ game code, Java, SQL, form emails and even Python code. also be used to generate C++ game code, Java, SQL, form emails and even
Python code.
It is a fork of the original CheetahTemplate library. It is a fork of the original CheetahTemplate library.
%prep %prep
%setup -q -n Cheetah3-%{version} %setup -q -n %{modname}-%{version}
%autopatch -p1
find . -name \*.py -print0 |xargs -0 -t -l sed -i -e '1{\@^#!%{_bindir}/env python@d}'
%build %build
%python_build %python_build
%install %install
%python_install %python_install
%python_expand rm -r %{buildroot}%{$python_sitearch}/Cheetah/Tests %{python_expand rm -r %{buildroot}%{$python_sitearch}/Cheetah/Tests
%python_expand %fdupes %{buildroot}%{$python_sitearch} %fdupes %{buildroot}%{$python_sitearch}
}
%check %check
%{python_expand export PYTHONPATH=$(pwd)
export PYTHONDONTWRITEBYTECODE=1 export PYTHONDONTWRITEBYTECODE=1
%python_expand PATH=$PATH:%{buildroot}%{_bindir} PYTHONPATH=$(pwd) $python Cheetah/Tests/Test.py export PATH=%{buildroot}%{_bindir}:$PATH
$python Cheetah/Tests/Test.py
}
%files %{python_files} %files %{python_files}
%license LICENSE %license LICENSE
%doc ANNOUNCE.rst README.rst BUGS %doc ANNOUNCE.rst README.rst BUGS
%python3_only %{_bindir}/cheetah %{_bindir}/cheetah*
%python3_only %{_bindir}/cheetah-analyze
%python3_only %{_bindir}/cheetah-compile
%{python_sitearch}/* %{python_sitearch}/*
%changelog %changelog