public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-mathics-pygments] rawhide: Update to 10.0.0 + spec cleanup and modernization
@ 2026-08-07 18:45 Filipe Rosset
  0 siblings, 0 replies; only message in thread
From: Filipe Rosset @ 2026-08-07 18:45 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/python-mathics-pygments
            Branch : rawhide
            Commit : f7b75613824e2a30f1640321366079b4aced4547
            Author : Filipe Rosset <rosset.filipe@gmail.com>
            Date   : 2026-08-07T15:45:00-03:00
            Stats  : +22/-47 in 4 file(s)
            URL    : https://src.fedoraproject.org/rpms/python-mathics-pygments/c/f7b75613824e2a30f1640321366079b4aced4547?branch=rawhide

            Log:
            Update to 10.0.0 + spec cleanup and modernization

Signed-off-by: Filipe Rosset <rosset.filipe@gmail.com>

---
diff --git a/.gitignore b/.gitignore
index 3a314d6..f42966f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 /mathics-pygments-1.0.2.tar.gz
+/Mathics3-pygments-10.0.0.tar.gz

diff --git a/5.patch b/5.patch
deleted file mode 100644
index 51a7a46..0000000
--- a/5.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 66ca27de4f8fc7bd3bdbc739c18e72f7daff59d7 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= <thrnciar@redhat.com>
-Date: Fri, 19 Apr 2024 11:29:47 +0200
-Subject: [PATCH] Replace setup() method with setup_method() to add
- compatibility with pytest 8
-
----
- tests/test_lexer.py | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/tests/test_lexer.py b/tests/test_lexer.py
-index 986aae1..7bdf833 100644
---- a/tests/test_lexer.py
-+++ b/tests/test_lexer.py
-@@ -11,7 +11,7 @@
- 
- 
- class TestMathematicaLexer:
--    def setup(self):
-+    def setup_method(self):
-         self.lexer = MathematicaLexer()
- 
-     def verify(self, code, expected):
-@@ -414,5 +414,5 @@ def test_lexical_scope_nasty(self):
- 
- if __name__ == "__main__":
-     t = TestMathematicaLexer()
--    t.setup()
-+    t.setup_method()
-     t.test_get()

diff --git a/python-mathics-pygments.spec b/python-mathics-pygments.spec
index 3237bf6..2bf012e 100644
--- a/python-mathics-pygments.spec
+++ b/python-mathics-pygments.spec
@@ -1,35 +1,39 @@
-%global srcname mathics-pygments
+%global forgeurl https://github.com/Mathics3/Mathics3-pygments
+Version:        10.0.0
+%global tag     %{version}
+%forgemeta
 
-Name:           python-%{srcname}
-Version:        1.0.2
+Name:           python-mathics-pygments
 Release:        %autorelease
 Summary:        Mathematica/Wolfram Language Lexer for Pygments
 
 License:        MIT
-URL:            http://github.com/Mathics3/mathics-pygments
-# PyPI source tarball is misnamed
-Source:         %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz
-
-# Compatibility with pytest 8
-Patch:          https://github.com/Mathics3/mathics-pygments/pull/5.patch
+URL:            %{forgeurl}
+Source:         %{forgesource}
 
 BuildArch:      noarch
-BuildRequires:  python3-devel
-BuildRequires:  python3-pytest
+BuildRequires:  python%{python3_pkgversion}-devel
+BuildRequires:  python%{python3_pkgversion}-pytest
 
 %global _description %{expand:
-This is package provides a lexer and highlighter for Mathematica/Wolfram
+This package provides a lexer and highlighter for Mathematica/Wolfram
 Language source code using the pygments engine.}
 
 %description %_description
 
-%package -n     python3-%{srcname}
+%package -n     python%{python3_pkgversion}-mathics-pygments
 Summary:        %{summary}
 
-%description -n python3-%{srcname} %_description
+%description -n python%{python3_pkgversion}-mathics-pygments %_description
 
 %prep
-%autosetup -p1 -n %{srcname}-%{version}
+%autosetup -n Mathics3-pygments-%{version}
+# Relax/rename the dependency on Mathics3_Scanner to use Fedora's package name and version
+sed -i 's/"Mathics3_Scanner>=10.0.0"/"mathics-scanner>=1.3.0"/' pyproject.toml
+sed -i 's/Mathics3_Scanner>=10.0.0/mathics-scanner>=1.3.0/' requirements.txt
+
+# Remove shebang from non-executable script
+sed -i '1{\@^#!/usr/bin/env python@d}' mathics_pygments/generate/build_pygments_tables.py
 
 %generate_buildrequires
 %pyproject_buildrequires
@@ -44,7 +48,7 @@ Summary:        %{summary}
 %check
 %pytest
 
-%files -n python3-%{srcname} -f %{pyproject_files}
+%files -n python%{python3_pkgversion}-mathics-pygments -f %{pyproject_files}
 %license LICENSE
 %doc README.md CHANGES.rst
 

diff --git a/sources b/sources
index 2c758a0..5ac1b09 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (mathics-pygments-1.0.2.tar.gz) = 19fc823ff8463eec7235f27697ea4b737951eb5b65ab936368710346c637469aa93a3f58eb2d6bc89fadbacd43c633c0303a8ac1aa0f606487825c8bb6416a5c
+SHA512 (Mathics3-pygments-10.0.0.tar.gz) = 3781a5be4f2e93f1488a043a9d3ab710dd52adc4de958c3968512be170328f3087e4f36cac290f79c7e4f71c12d3390d408a08d29440523feb2fefb62c0183ce

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-07 18:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-07 18:45 [rpms/python-mathics-pygments] rawhide: Update to 10.0.0 + spec cleanup and modernization Filipe Rosset

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox