Accepting request 957665 from home:badshah400:branches:science
A command line interface to Mathics. OBS-URL: https://build.opensuse.org/request/show/957665 OBS-URL: https://build.opensuse.org/package/show/science/python-mathicsscript?expand=0&rev=1
This commit is contained in:
24
.gitattributes
vendored
Normal file
24
.gitattributes
vendored
Normal file
@@ -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
|
||||
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
*.obscpio
|
||||
*.osc
|
||||
_build.*
|
||||
.pbuild
|
||||
3
_multibuild
Normal file
3
_multibuild
Normal file
@@ -0,0 +1,3 @@
|
||||
<multibuild>
|
||||
<package>test</package>
|
||||
</multibuild>
|
||||
3
mathicsscript-4.0.0.tar.gz
Normal file
3
mathicsscript-4.0.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1c0499a0b793e8ccab8d3992c4ecfb644ee7b69bf9a22c9ff074ad1d0fe27b8c
|
||||
size 188748
|
||||
7
python-mathicsscript.changes
Normal file
7
python-mathicsscript.changes
Normal file
@@ -0,0 +1,7 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Feb 5 18:37:07 UTC 2022 - Atri Bhattacharya <badshah400@gmail.com>
|
||||
|
||||
- New package.
|
||||
- Split out tests into its own multiflavor flavor since it needs
|
||||
to use the mathicsscript binary installed using
|
||||
update-alternatives.
|
||||
123
python-mathicsscript.spec
Normal file
123
python-mathicsscript.spec
Normal file
@@ -0,0 +1,123 @@
|
||||
#
|
||||
# spec file for package python-mathicsscript
|
||||
#
|
||||
# Copyright (c) 2022 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/
|
||||
#
|
||||
|
||||
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%if "%{flavor}" == "test"
|
||||
%define psuffix -test
|
||||
%bcond_without test
|
||||
%else
|
||||
%define psuffix %{nil}
|
||||
%bcond_with test
|
||||
%endif
|
||||
%define skip_python2 1
|
||||
%define modname mathicsscript
|
||||
Name: python-mathicsscript%{psuffix}
|
||||
Version: 4.0.0
|
||||
Release: 0
|
||||
Summary: A command line interface to Mathics
|
||||
License: GPL-3.0-or-later
|
||||
URL: https://mathics.org/
|
||||
Source0: https://github.com/Mathics3/mathicsscript/archive/refs/tags/%{version}.tar.gz#/%{modname}-%{version}.tar.gz
|
||||
BuildRequires: %{python_module Mathics}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-Cython
|
||||
Requires: python-PyYAML
|
||||
Requires: python-colorama
|
||||
Requires: python-columnize
|
||||
Requires: python-mathics-pygments
|
||||
Requires: python-networkx
|
||||
Requires: python-numpy
|
||||
Requires: python-prompt_toolkit
|
||||
Requires: python-requests
|
||||
Requires: python-term-background
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
%if %{with test}
|
||||
# SECTION For tests
|
||||
BuildRequires: %{python_module Cython}
|
||||
BuildRequires: %{python_module PyYAML}
|
||||
BuildRequires: %{python_module colorama}
|
||||
BuildRequires: %{python_module columnize}
|
||||
BuildRequires: %{python_module mathics-pygments}
|
||||
BuildRequires: %{python_module mathicsscript}
|
||||
BuildRequires: %{python_module networkx}
|
||||
BuildRequires: %{python_module numpy}
|
||||
BuildRequires: %{python_module prompt_toolkit >= 3.0.18}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module requests}
|
||||
BuildRequires: %{python_module term-background}
|
||||
# /SECTION
|
||||
%endif
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
Mathicsscript is a feature-rich command line interface to Mathics.
|
||||
|
||||
%prep
|
||||
%autosetup -n %{modname}-%{version}
|
||||
|
||||
%build
|
||||
%if %{without test}
|
||||
%python_build
|
||||
%endif
|
||||
|
||||
%install
|
||||
%if %{without test}
|
||||
%python_install
|
||||
%{python_expand # Miscellaneous fixes
|
||||
# Clear some unnecessary hashbangs
|
||||
sed -i "1{\@/usr/bin/env@d}" \
|
||||
%{buildroot}%{$python_sitelib}/%{modname}/fake_psviewer.py \
|
||||
%{buildroot}%{$python_sitelib}/%{modname}/__main__.py \
|
||||
%{buildroot}%{$python_sitelib}/%{modname}/asymptote.py
|
||||
# Move test dir into main module dir
|
||||
mv %{buildroot}%{$python_sitelib}/test %{buildroot}%{$python_sitelib}/%{modname}/
|
||||
%fdupes %{buildroot}%{$python_sitelib}/%{modname}/
|
||||
%fdupes %{buildroot}%{$python_sitelib}/%{modname}-%{version}-py%{$python_version}.egg-info/
|
||||
}
|
||||
|
||||
%python_clone -a %{buildroot}%{_bindir}/fake_psviewer.py
|
||||
%python_clone -a %{buildroot}%{_bindir}/mathicsscript
|
||||
%endif
|
||||
|
||||
%if %{with test}
|
||||
%check
|
||||
%pytest
|
||||
%endif
|
||||
|
||||
%if %{without test}
|
||||
%post
|
||||
%python_install_alternative fake_psviewer.py
|
||||
%python_install_alternative mathicsscript
|
||||
|
||||
%postun
|
||||
%python_uninstall_alternative fake_psviewer.py
|
||||
%python_uninstall_alternative mathicsscript
|
||||
|
||||
%files %{python_files}
|
||||
%license COPYING.txt
|
||||
%doc README.rst
|
||||
%python_alternative %{_bindir}/fake_psviewer.py
|
||||
%python_alternative %{_bindir}/mathicsscript
|
||||
%{python_sitelib}/%{modname}/
|
||||
%{python_sitelib}/%{modname}-%{version}-py%{python_version}.egg-info/
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
Reference in New Issue
Block a user