commit d6cdb09e21154edc140befaf576d59fcf432c941d4237bcd58210bce6a9b1fe7 Author: Atri Bhattacharya Date: Wed Aug 4 07:46:26 2021 +0000 Accepting request 909997 from home:susnux:branches:science Fix rpmlint warnings OBS-URL: https://build.opensuse.org/request/show/909997 OBS-URL: https://build.opensuse.org/package/show/science/python-Mathics-Scanner?expand=0&rev=1 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/9346764dfd22f011ec7bba9248497383f4b98a3a.patch b/9346764dfd22f011ec7bba9248497383f4b98a3a.patch new file mode 100644 index 0000000..45bbfea --- /dev/null +++ b/9346764dfd22f011ec7bba9248497383f4b98a3a.patch @@ -0,0 +1,19 @@ +From 9346764dfd22f011ec7bba9248497383f4b98a3a Mon Sep 17 00:00:00 2001 +From: Ferdinand Thiessen +Date: Sat, 31 Jul 2021 19:20:53 +0200 +Subject: [PATCH] Fix shbang of rl_inputrc.py + +--- + mathics_scanner/generate/rl_inputrc.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/mathics_scanner/generate/rl_inputrc.py b/mathics_scanner/generate/rl_inputrc.py +index a7be6a7..778c34e 100755 +--- a/mathics_scanner/generate/rl_inputrc.py ++++ b/mathics_scanner/generate/rl_inputrc.py +@@ -1,4 +1,4 @@ +-#!/bin python3 ++#!/usr/bin/env python3 + """ + Creates GNU Readline inputrc tables for converting Wolfram Language escape + sequences to either unicode symbols or Wolfram Language fully qualified named diff --git a/Mathics_Scanner-1.2.4.tar.gz b/Mathics_Scanner-1.2.4.tar.gz new file mode 100644 index 0000000..0f210a9 --- /dev/null +++ b/Mathics_Scanner-1.2.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7b05939751aacea42f3fc4e7eb1ab111f9fe32bae827e89f46a50e04907b19ef +size 113724 diff --git a/python-Mathics-Scanner.changes b/python-Mathics-Scanner.changes new file mode 100644 index 0000000..38ed4a4 --- /dev/null +++ b/python-Mathics-Scanner.changes @@ -0,0 +1,15 @@ +------------------------------------------------------------------- +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..e95b485 --- /dev/null +++ b/python-Mathics-Scanner.spec @@ -0,0 +1,77 @@ +# +# spec file for package python-Mathics-Scanner +# +# Copyright (c) 2021 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/ +# + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%define skip_python2 1 +Name: python-Mathics-Scanner +Version: 1.2.4 +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/Mathics_Scanner-%{version}.tar.gz +Patch0: https://github.com/Mathics3/mathics-scanner/commit/9346764dfd22f011ec7bba9248497383f4b98a3a.patch +BuildRequires: python-rpm-macros +BuildRequires: %{python_module setuptools} +# SECTION test requirements +BuildRequires: %{python_module chardet} +BuildRequires: %{python_module click} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module PyYAML} +# /SECTION +BuildRequires: fdupes +Requires: python-chardet +Requires: python-click +Requires: python-PyYAML +Recommends: python-ujson +BuildArch: noarch +%python_subpackages + +%description +Character Tables and Tokenizer for Mathics and the Wolfram Language. + +%prep +%setup -q -n Mathics_Scanner-%{version} +%patch0 -p1 +# Fix shbang +sed -i "s|/usr/bin/env python|/usr/bin/python|" mathics_scanner/generate/{build_tables,rl_inputrc}.py + +%build +%python_build + +%install +%python_install +%python_clone -a %{buildroot}%{_bindir}/mathics-generate-json-table +%python_expand %fdupes %{buildroot}%{$python_sitelib} +# Should be executable +%python_expand chmod 0755 %{buildroot}%{$python_sitelib}/mathics_scanner/generate/{build_tables,rl_inputrc}.py + +%check +%pytest + +%post +%python_install_alternative mathics-generate-json-table + +%postun +%python_uninstall_alternative mathics-generate-json-table + +%files %{python_files} +%python_alternative %{_bindir}/mathics-generate-json-table +%{python_sitelib}/* + +%changelog