commit c8d5f05d1ee8f04320a0690017fab39158a1911ecf7e2ae690778c51b647adf7 Author: Atri Bhattacharya Date: Thu Sep 4 18:08:29 2025 +0000 Update to version 2.0.0. OBS-URL: https://build.opensuse.org/package/show/science/python-Mathics-Scanner?expand=0&rev=11 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/mathics_scanner-2.0.0.tar.gz b/mathics_scanner-2.0.0.tar.gz new file mode 100644 index 0000000..1ba0fe8 --- /dev/null +++ b/mathics_scanner-2.0.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0424ae0918313640af52a7bbadc91824ca1869eb1ad0e0dd87c784c141326d9a +size 199851 diff --git a/python-Mathics-Scanner.changes b/python-Mathics-Scanner.changes new file mode 100644 index 0000000..2033129 --- /dev/null +++ b/python-Mathics-Scanner.changes @@ -0,0 +1,80 @@ +------------------------------------------------------------------- +Sun Aug 31 04:48:13 UTC 2025 - Atri Bhattacharya + +- Update to version 2.0.0: + * Support for saving token position information was started. + * Scanning was revised to handle more kinds of escape sequences + and to be sensitive to their placement inside and outside a + string. + * Tokenization support for Box Input operator \* was added. + * Small YML changes were made to reflect a better understanding + of boxing operators. In particular, \* is not a (prefix) + operator. + * Internals: Mathics3 scanner exceptions of class TranslateError + are incompatible with previous versions, and now store error + parameters, "name", "tag", and "args". + * Bugs fixed: + - gh#Mathics3/mathics-scanner#125 + - gh#Mathics3/mathics-scanner#136 + +------------------------------------------------------------------- +Thu May 29 11:24:05 UTC 2025 - Max Lin + +- Fix Leap 16.0 build + +------------------------------------------------------------------- +Sun Feb 2 07:27:51 UTC 2025 - Atri Bhattacharya + +- Update to version 1.4.1: + * Include new operator YML and JSON + +------------------------------------------------------------------- +Tue Aug 13 04:53:15 UTC 2024 - Atri Bhattacharya + +- Update to version 1.3.1: + * Packaging was redone to be able to support Python 3.12. + * Files now follow current Python black formatting and isort + import ordering. + * Some Python code linting. +- Compatibility with python 3.6 dropped, bump miminum python-base + version in BuildRequires to 3.8. + +------------------------------------------------------------------- +Mon Apr 10 20:45:44 UTC 2023 - Atri Bhattacharya + +- Update to version 1.3.0: + * Add escape-code sequence for 32-bit Unicode + (gh#Mathics3/mathics-scanner#48). + * Correct Infix and Tilde character symbols + * Support double backslash (\\) as a single backslash character + (\). + * Correct Unicode for ScriptN and ScriptCaptialN + * Correct a number of is-letter-like entries. + * Accept \u21A6 as symbol for Function. + * Change the precedence of |->(Function symbol) to 800 so it + isn't interpreted as a | followed by -> + * ASCII operator tables can now be generated + * Add DifferentialD and Integrate even though we don't have a + full set of prefix operators. + * More precedence values added to operators + * Python 3.11 operation verified +- Drop 9346764dfd22f011ec7bba9248497383f4b98a3a.patch: + incorporated upstream. +- Requires(post): update-alternatives for correct post scriptlet + runs. + +------------------------------------------------------------------- +Sun Jul 11 09:27:26 UTC 2021 - Ferdinand Thiessen + +- Update to version 1.2.4 + * Start adding AMSLateX names. + * Add ``ApplyTo``, and ``Factorial2``. + * Adjust ``Tilde``, and ``Factorial``. + * Regularize unicode equivalents. +- Add 9346764dfd22f011ec7bba9248497383f4b98a3a.patch + +------------------------------------------------------------------- +Sat Jul 10 14:29:57 UTC 2021 - Ferdinand Thiessen + +- Initial package at version 1.2.3 for Mathics3 + diff --git a/python-Mathics-Scanner.spec b/python-Mathics-Scanner.spec new file mode 100644 index 0000000..6a85f99 --- /dev/null +++ b/python-Mathics-Scanner.spec @@ -0,0 +1,89 @@ +# +# spec file for package python-Mathics-Scanner +# +# Copyright (c) 2025 SUSE LLC and contributors +# +# 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/ +# + + +%define modname mathics_scanner +Name: python-Mathics-Scanner +Version: 2.0.0 +Release: 0 +Summary: Character Tables and Tokenizer for Mathics and the Wolfram Language +License: GPL-3.0-only +URL: https://mathics.org/ +Source: https://files.pythonhosted.org/packages/source/M/Mathics-Scanner/%{modname}-%{version}.tar.gz +BuildRequires: %{python_module base >= 3.10} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: python-rpm-macros +# SECTION test requirements +BuildRequires: %{python_module chardet} +BuildRequires: %{python_module PyYAML} +BuildRequires: %{python_module click} +BuildRequires: %{python_module pytest} +# /SECTION +BuildRequires: fdupes +Requires: python-PyYAML +Requires: python-chardet +Requires: python-click +Requires(post): update-alternatives +Requires(postun): update-alternatives +Recommends: python-ujson +BuildArch: noarch +%python_subpackages + +%description +Character Tables and Tokenizer for Mathics and the Wolfram Language. + +%prep +%setup -q -n %{modname}-%{version} +# Fix shbang +sed -i "s|/usr/bin/env python|/usr/bin/python3|" mathics_scanner/generate/build_{,operator_}tables.py +sed -i "s|/usr/bin/env python3|/usr/bin/python3|" mathics_scanner/generate/rl_inputrc.py + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_clone -a %{buildroot}%{_bindir}/mathics3-generate-json-table +%python_clone -a %{buildroot}%{_bindir}/mathics3-generate-operator-json-table +%python_clone -a %{buildroot}%{_bindir}/mathics3-tokens +%python_expand %fdupes %{buildroot}%{$python_sitelib} +# Should be executable +%python_expand chmod 0755 %{buildroot}%{$python_sitelib}/mathics_scanner/generate/{build_tables,build_operator_tables,rl_inputrc}.py + +%check +%pytest + +%post +%python_install_alternative mathics3-generate-json-table +%python_install_alternative mathics3-generate-operator-json-table +%python_install_alternative mathics3-tokens + +%postun +%python_uninstall_alternative mathics3-generate-json-table +%python_uninstall_alternative mathics3-generate-operator-json-table +%python_uninstall_alternative mathics3-tokens + +%files %{python_files} +%python_alternative %{_bindir}/mathics3-generate-json-table +%python_alternative %{_bindir}/mathics3-generate-operator-json-table +%python_alternative %{_bindir}/mathics3-tokens +%{python_sitelib}/%{modname}/ +%{python_sitelib}/[Mm]athics_[Ss]canner-%{version}*.*-info/ + +%changelog