commit 52512e472a51685c9a0469200977da80bec78738746afdefb8a7ce1ce398ca99 Author: Dmitry Roshchin Date: Sun Feb 9 17:26:46 2025 +0000 Accepting request 1244374 from home:badshah400:branches:science Bowser based UI for Mathics (depends on sr#1244373). OBS-URL: https://build.opensuse.org/request/show/1244374 OBS-URL: https://build.opensuse.org/package/show/science/python-Mathics-Django?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..37a8eaa --- /dev/null +++ b/.gitattributes @@ -0,0 +1,24 @@ +*.changes merge=merge-changes +*.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 +*.tar 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..8b731c3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.obscpio +*.osc +_build.* +.pbuild diff --git a/Mathics_Django-8.0.1.tar.gz b/Mathics_Django-8.0.1.tar.gz new file mode 100644 index 0000000..94176b3 --- /dev/null +++ b/Mathics_Django-8.0.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f896fef54e0aa19fe2eb13f650540c49481679843101f912f97b30c3c5a99bb3 +size 24237855 diff --git a/python-Mathics-Django.changes b/python-Mathics-Django.changes new file mode 100644 index 0000000..cea3f9d --- /dev/null +++ b/python-Mathics-Django.changes @@ -0,0 +1,13 @@ +------------------------------------------------------------------- +Sat Feb 8 16:39:57 UTC 2025 - Atri Bhattacharya + +- Update to version 8.0.1: + * Adjust and correct packaging (thanks to Atri Bhattacharya for + testing and packaging in OpenSUSE) . + * Documentation adjusted: Update to newer MathML code and track + API changes in Mathics Kernel (Mauricio Matera). + +------------------------------------------------------------------- +Sat Feb 8 16:16:17 UTC 2025 - Atri Bhattacharya + +- Initial package. diff --git a/python-Mathics-Django.spec b/python-Mathics-Django.spec new file mode 100644 index 0000000..3d48c6c --- /dev/null +++ b/python-Mathics-Django.spec @@ -0,0 +1,95 @@ +# +# spec file for package python-Mathics-Django +# +# Copyright (c) 2025 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/ +# + + +%define modname Mathics_Django +%define skip_python313 1 +Name: python-Mathics-Django +Version: 8.0.1 +Release: 0 +Summary: A Django front end for Mathics3 +# Mathics itself is licensed as GPL-3.0 but it includes third-party software with MIT, BSD-3-Clause, and Apache-2.0 Licensing; also includes data from wikipedia licensed under CC-BY-SA-3.0 and GFDL-1.3 +License: Apache-2.0 AND BSD-3-Clause AND GPL-3.0-only AND MIT +URL: https://mathics.org/ +Source: https://files.pythonhosted.org/packages/source/m/mathics-django/Mathics_Django-%{version}.tar.gz +BuildRequires: python-rpm-macros +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +# SECTION test requirements +BuildRequires: %{python_module django} +BuildRequires: %{python_module Mathics-Scanner >= 1.4.1} +BuildRequires: %{python_module Mathics3 >= 8.0.0} +BuildRequires: %{python_module matplotlib} +BuildRequires: %{python_module networkx >= 3.0} +BuildRequires: %{python_module pygments} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module requests} +# /SECTION +BuildRequires: fdupes +Requires: python-django +Requires: python-Mathics-Scanner >= 1.4.1 +Requires: python-Mathics3 >= 8.0.0 +Requires: python-matplotlib +Requires: python-networkx >= 3.0 +Requires: python-pygments +Requires: python-requests +Requires(post): update-alternatives +Requires(postun): update-alternatives +BuildArch: noarch +%python_subpackages + +%description +%{name} provides a Django front end for Mathics3, integrating GUI and help +%browser. + +%prep +%autosetup -p1 -n mathics_django-%{version} +find ./ -name *~ -delete -print +find ./mathics_django/web/ -name *.js -exec chmod -x {} \; +sed -Ei "1{\@^#\!/usr/bin/env python@d}" ./mathics_django/{docpipeline,manage,server}.py +sed -Ei "1{\@^#\!/usr/bin/env python@d}" ./mathics_django/web/{authentication,forms}.py +sed -Ei "1{\@^#\!/usr/bin/env python@d}" ./mathics_django/web/templatetags/*.py + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_clone -a %{buildroot}%{_bindir}/mathicsserver +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%{python_expand # Tests +export PYTHONPATH=%{buildroot}%{$python_sitelib} +export MPLCONFIGDIR=`mktemp -d -p .` +export HOME=${PWD} +$python %{buildroot}%{$python_sitelib}/mathics_django/manage.py test test_django +} + +%post +%python_install_alternative mathicsserver + +%postun +%python_uninstall_alternative mathicsserver + +%files %{python_files} +%python_alternative %{_bindir}/mathicsserver +%{python_sitelib}/mathics_django/ +%{python_sitelib}/%{modname}-%{version}.dist-info/ + +%changelog