commit 401908dc39ca89127826a7dd88f142dfd5a86ea0393c11d020b47b48bf73b85b Author: Matthias Mailänder Date: Mon Dec 18 08:30:55 2017 +0000 Accepting request 557944 from home:badshah400:Staging A symbolic calculation module for python OBS-URL: https://build.opensuse.org/request/show/557944 OBS-URL: https://build.opensuse.org/package/show/science/python-Mathics?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/python-Mathics.changes b/python-Mathics.changes new file mode 100644 index 0000000..3440c27 --- /dev/null +++ b/python-Mathics.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Mon Dec 18 07:34:29 UTC 2017 - badshah400@gmail.com + +- Initial package. + diff --git a/python-Mathics.spec b/python-Mathics.spec new file mode 100644 index 0000000..7c5a7f6 --- /dev/null +++ b/python-Mathics.spec @@ -0,0 +1,94 @@ +# +# spec file for package python-Mathics +# +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# +# 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 http://bugs.opensuse.org/ +# + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%define pyname Mathics +Name: python-Mathics +Version: 1.0 +Release: 0 +Summary: A general-purpose computer algebra system +# FIXME: Contains other OS Licensed components +License: GPL-3.0 +Group: Development/Languages/Python +Url: https://mathics.github.io/ +Source: https://github.com/mathics/Mathics/archive/v%{version}.tar.gz +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildRequires: %{python_module colorama} +BuildRequires: %{python_module devel} +BuildRequires: %{python_module Django >= 1.8} +BuildRequires: %{python_module mpmath >= 0.19} +BuildRequires: %{python_module pexpect} +BuildRequires: %{python_module python-dateutil} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module six >= 1.10} +BuildRequires: %{python_module sympy} +Requires: python-colorama +Requires: python-Django >= 1.8 +Requires: python-mpmath >= 0.19 +Requires: python-python-dateutil +Requires: python-six >= 1.10 +Requires: python-sympy +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%python_subpackages + +%description +Mathics is a general-purpose computer algebra system (CAS). It is meant to be a free, lightweight alternative to Mathematica. + +%prep +%setup -q -n %{pyname}-%{version} + +# FIX SPURIOUS EXEC PERMISSIONS +find ./mathics/web/media/js -name "*.js" -exec chmod -x '{}' \; +find ./mathics/web/media/js -name "*.svg" -exec chmod -x '{}' \; +chmod -x ./mathics/data/ExampleData/{numberdata.csv,InventionNo1.xml} + +# WRONG END-OF-FILE ENCODING +sed -i "s/\r$//" ./mathics/data/ExampleData/numberdata.csv + +# REMOVE SHEBANGS FROM FILES INSTALLED TO NON-EXEC LOCATIONS +pushd mathics +for d in `find ./ -prune -type d` +do + find ${d} -name "*.py" -exec sed -i "1,4{/\/usr\/bin\/env/d}" '{}' \; +done +popd + +%build +%python_build + +%install +%python_install + +#FIXME: Errors with check +#%%check +#%%python_exec setup.py test + +%fdupes %{buildroot}%{python2_sitelib}/ +%fdupes %{buildroot}%{python3_sitelib}/ + +%files %python_files +%defattr(-,root,root) +%doc README.rst COPYING.txt AUTHORS.txt +%{python_sitelib}/mathics/ +%{python_sitelib}/%{pyname}-%{version}-py%{py_ver}.egg-info/ +%python3_only %{_bindir}/mathicsscript +%python3_only %{_bindir}/mathicsserver +%python3_only %{_bindir}/mathics + +%changelog diff --git a/v1.0.tar.gz b/v1.0.tar.gz new file mode 100644 index 0000000..4f7e116 --- /dev/null +++ b/v1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:12ef8c5daa37d949f68ce347633f4eb07b5cca689f60c8756a7526676b6bd6da +size 4887310