#6 Update to 3.2.6.post1 and convert to pyproject macros
Merged 2 years ago by carlwgeorge. Opened 2 years ago by carlwgeorge.
rpms/ carlwgeorge/python-cheetah update  into  rawhide

@@ -0,0 +1,61 @@ 

+ From af2b19626e5b46100d1b46f02586760367710b85 Mon Sep 17 00:00:00 2001

+ From: Oleg Broytman <phd@phdru.name>

+ Date: Sun, 20 Feb 2022 14:23:53 +0300

+ Subject: [PATCH] Tests(tox): Add Python 3.10 to `tox.ini`

+ 

+ ---

+  SetupConfig.py | 1 +

+  tox.ini        | 7 ++++---

+  2 files changed, 5 insertions(+), 3 deletions(-)

+ 

+ diff --git a/SetupConfig.py b/SetupConfig.py

+ index da68d1d..886b774 100644

+ --- a/SetupConfig.py

+ +++ b/SetupConfig.py

+ @@ -57,6 +57,7 @@ classifiers = [line.strip() for line in '''\

+    Programming Language :: Python :: 3.7

+    Programming Language :: Python :: 3.8

+    Programming Language :: Python :: 3.9

+ +  Programming Language :: Python :: 3.10

+    Topic :: Internet :: WWW/HTTP

+    Topic :: Internet :: WWW/HTTP :: Dynamic Content

+    Topic :: Internet :: WWW/HTTP :: Site Management

+ diff --git a/tox.ini b/tox.ini

+ index 3b25c2f..9f03376 100644

+ --- a/tox.ini

+ +++ b/tox.ini

+ @@ -5,7 +5,7 @@

+  

+  [tox]

+  minversion = 3.15

+ -envlist = py27,py3{4,5,6,7,8,9},pypy,py{27,38,39}-flake8

+ +envlist = py27,py3{4,5,6,7,8,9},pypy,py{27,38,39,310}-flake8

+  

+  [testenv]

+  basepython =

+ @@ -16,6 +16,7 @@ basepython =

+      py37: {env:TOXPYTHON:python3.7}

+      py38: {env:TOXPYTHON:python3.8}

+      py39: {env:TOXPYTHON:python3.9}

+ +    py310: {env:TOXPYTHON:python3.10}

+      pypy: {env:TOXPYTHON:pypy}

+  commands =

+      {envpython} --version

+ @@ -27,12 +28,12 @@ passenv = CI TRAVIS TRAVIS_* APPVEYOR DISTUTILS_USE_SDK MSSdk INCLUDE LIB WINDIR

+  setenv =

+      LC_CTYPE = en_US.UTF-8

+  

+ -[testenv:{py27,py34,py35,py36,py37,py38,py39,pypy}]

+ +[testenv:{py27,py34,py35,py36,py37,py38,py39,py310,pypy}]

+  commands =

+      {[testenv]commands}

+      {envpython} {envsitepackagesdir}/Cheetah/Tests/Test.py

+  

+ -[testenv:{py27,py34,py35,py36,py37,py38,py39}-flake8]

+ +[testenv:{py27,py34,py35,py36,py37,py38,py39,py310}-flake8]

+  deps =

+      flake8

+  commands =

+ -- 

+ 2.35.1

+ 

file removed
-27
@@ -1,27 +0,0 @@ 

- From 112dddd8fa5fb9c285fb8ef2818abfef99365070 Mon Sep 17 00:00:00 2001

- From: Victor Stinner <vstinner@python.org>

- Date: Tue, 19 Jan 2021 11:19:15 +0100

- Subject: [PATCH] Skip test_import_bootlocale() on Python 3.10

- 

- The _bootlocale module has been removed from Python 3.10:

- https://github.com/python/cpython/commit/b62bdf71ea0cd52041d49691d8ae3dc645bd48e1

- https://bugs.python.org/issue42208

- ---

-  Cheetah/Tests/ImportHooks.py | 4 +++-

-  1 file changed, 3 insertions(+), 1 deletion(-)

- 

- diff --git a/Cheetah/Tests/ImportHooks.py b/Cheetah/Tests/ImportHooks.py

- index d7b5f5d..bc0239c 100644

- --- a/Cheetah/Tests/ImportHooks.py

- +++ b/Cheetah/Tests/ImportHooks.py

- @@ -87,7 +87,9 @@ def test_import_builtin(self):

-                  return

-          raise self.fail("All builtin modules are imported")

-  

- -    if not PY2:

- +    # _bootlocale was removed in Python 3.10:

- +    # https://bugs.python.org/issue42208

- +    if not PY2 and sys.version_info < (3, 10):

-          def test_import_bootlocale(self):

-              if '_bootlocale' in sys.modules:

-                  del sys.modules['_bootlocale']

file modified
+35 -73
@@ -1,113 +1,75 @@ 

- %bcond_with python2

- 

  Name:           python-cheetah

- Version:        3.2.4

- Release:        9%{?dist}

+ Version:        3.2.6.post1

+ Release:        1%{?dist}

  Summary:        Template engine and code generator

  

  License:        MIT

  URL:            https://cheetahtemplate.org/

- Source:         https://github.com/CheetahTemplate3/cheetah3/archive/%{version}/%{name}-%{version}.tar.gz

+ Source:         https://github.com/CheetahTemplate3/cheetah3/archive/%{version}/Cheetah3-%{version}.tar.gz

  

- # Skip test_import_bootlocale() on Python 3.10

- # _bootlocale was removed in Python 3.10:

- # https://bugs.python.org/issue42208

- Patch1:         https://github.com/CheetahTemplate3/cheetah3/commit/1041d5485c.patch

+ # https://github.com/CheetahTemplate3/cheetah3/commit/6be6bc10a46f61c640ca0f7de42af56a84a3a0fc

+ Patch:          0001-Tests-tox-Add-Python-3.10-to-tox.ini.patch

  

  BuildRequires:  gcc

+ BuildRequires:  python3-devel

  

- %global _description\

- Cheetah is an open source template engine and code generation tool,\

- written in Python. It can be used standalone or combined with other\

- tools and frameworks. Web development is its principal use, but\

- Cheetah is very flexible and is also being used to generate C++ code,\

- Java, SQL, form emails and even Python code.

+ %global _description %{expand:

+ Cheetah3 is a free and open source template engine and code generation tool.

+ It can be used standalone or combined with other tools and frameworks.  Web

+ development is its principle use, but Cheetah is very flexible and is also

+ being used to generate C++ game code, Java, sql, form emails and even Python

+ code.}

  

  %description %{_description}

  

- %if %{with python2}

- %package -n python2-cheetah

- Summary: %summary

- %{?python_provide:%python_provide python2-cheetah}

- 

- BuildRequires: python2-devel

- BuildRequires: python2-setuptools

- # There is python2-markdown up to f30

- %if 0%{?fedora} && 0%{?fedora} < 31

- BuildRequires: python2-markdown

- %endif

- BuildRequires: python2-pygments

- 

- %description -n python2-cheetah %_description

- 

- %endif

  

  %package -n python3-cheetah

- Summary: %summary

- %{?python_provide:%python_provide python3-cheetah}

+ Summary:        %{summary}

  

- BuildRequires: python3-devel

- BuildRequires: python3-setuptools

- BuildRequires: python3-markdown

- BuildRequires: python3-pygments

  

- %description -n python3-cheetah %_description

+ %description -n python3-cheetah %{_description}

  

  

  %prep

  %autosetup -p1 -n cheetah3-%{version}

  

+ # remove upper bound on markdown test dependency

+ sed -e 's|, < 3.2||' -i tox.ini

+ 

  # remove unnecessary shebang lines to silence rpmlint

- %{__sed} -i -e '/^#!/,1d' Cheetah/Tests/*.py \

-     Cheetah/CheetahWrapper.py Cheetah/DirectiveAnalyzer.py \

-     Cheetah/Filters.py Cheetah/NameMapper.py Cheetah/Servlet.py \

-     Cheetah/Templates/SkeletonPage.py Cheetah/Tools/SiteHierarchy.py \

-     Cheetah/Version.py

+ find Cheetah -type f -name '*.py' -print0 | xargs -0 sed -i -e '1 {/^#!/d}'

  

- %build

- %if %{with python2}

- %py2_build

- %endif

  

- %py3_build

+ %generate_buildrequires

+ %pyproject_buildrequires -t

  

- %install

- %if %{with python2}

- %py2_install

  

- EGG_INFO=(%{buildroot}/%{python2_sitearch}/Cheetah*.egg-info)

- cp -r $EGG_INFO ${EGG_INFO//Cheetah3/Cheetah}

- sed -i "s/Name: Cheetah3/Name: Cheetah/" ${EGG_INFO//Cheetah3/Cheetah}/PKG-INFO

- rm %{buildroot}%{_bindir}/*

- %endif

+ %build

+ %pyproject_wheel

  

- %py3_install

  

+ %install

+ %pyproject_install

+ %pyproject_save_files Cheetah

  

- %check

- export PATH="%{buildroot}/%{_bindir}:$PATH"

- export PYTHONPATH="%{buildroot}/%{python3_sitearch}"

- %{buildroot}/%{_bindir}/cheetah test

  

- %if %{with python2}

- %files -n python2-cheetah

- %license LICENSE

- %doc ANNOUNCE.rst README.rst TODO BUGS

+ %check

+ # changing this in %%prep would cause an rpmlint error (rpm-buildroot-usage),

+ # so do it here instead

+ sed -e 's|{envsitepackagesdir}|%{buildroot}%{python3_sitearch}|' -i tox.ini

+ %tox

  

- %{python2_sitearch}/Cheetah

- %{python2_sitearch}/Cheetah*.egg-info

- %endif

  

- %files -n python3-cheetah

- %license LICENSE

+ %files -n python3-cheetah -f %{pyproject_files}

  %doc ANNOUNCE.rst README.rst TODO BUGS

- 

  %{_bindir}/cheetah*

  

- %{python3_sitearch}/Cheetah

- %{python3_sitearch}/Cheetah*.egg-info

  

  %changelog

+ * Thu Apr 07 2022 Carl George <carl@george.computer> - 3.2.6.post1-1

+ - Update to 3.2.6.post1

+ - Convert to pyproject macros

+ 

  * Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.4-9

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

  

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (python-cheetah-3.2.4.tar.gz) = 64fbe95fe8d5f3185168ba780e106a46caa0656272235168df603eff50dd6e476eed041658a1e11ae12ee10d148a001c32a23677a1ee6da5b6d43e20e4d1e36e

+ SHA512 (Cheetah3-3.2.6.post1.tar.gz) = f5b190e0ab032cd5e47be3a6065d726fc0d9b685d7e481cc7a49c0024f6a430be04b8068de5ec1280d95305049c00d2a727d20556a0fab8928c4e6459156c71a

no initial comment

Pull-Request has been merged by carlwgeorge

2 years ago