[Slackbuilds-users] updating mathics?

Jeremy Hansen jebrhansen+SBo at gmail.com
Wed Jan 8 04:13:20 UTC 2025


On Tue, Jan 7, 2025 at 4:42 PM <dchmelik at gmail.com> wrote:

> On 1/7/25 9:46 AM, Willy Sudiarto Raharjo wrote:
> >> I want to update mathics, which now consists of mathics-core,
> >> mathics- django, mathics-scanner, or mathics-omnibus, and others.  I
> >> checked what I needed while building,and my SlackBuilds (mentioned
> >> last year are on my website) made packages: determined the set needs
> >> click, mathics- django, mathics_scanner, python3-mpmath,
> >> python3-numpy, python3-scipy, python3-sympy, but I don't know what
> >> goes to what, so I asked mathics' slack chat months ago.  They never
> >> answered.  I asked their github.  Instead they talked about finding
> >> python package dependencies in general, such as with pipdeptree,
> >> which instead lists llvmite, mathics_scanner, mpmath, numpy,
> >> palettable, pillow, pint, python- dateutil, requests, setuptools,
> >> sympy (mathics-django is for command- line but might not be needed
> >> for world wide web interface also for localhost, but I'm unsure).
> >>          Then they proceeded to say 'standard' dependencies on
> >> Slackware 14--from 13 years ago--are old!
> >>          That's without getting to details whether mathics-create-
> >> database script Urchlay wrote is still needed (maybe not).
> >>          At this point, I give up: anyone can take over mathics.
> >> However, if no one does, I'll try to continue.  I just haven't known
> >> what to do since Mathics 4 (by/after which it doesn't work right) and
> >> now despite it's called Mathics3, it's mathics 7. It's a 'mess of
> >> python dependencies' the programmers apparently aren't
> >> following/using strictly UNIX-like OS, so I'm stuck.  I won't be able
> >> to submit the new updates (though they work) without finding out what
> >> the dependencies really are.
> >>          Maybe WolframEngine is easier (just haven't been able to
> >> install).
> >
> > Start with the core package first
> > https://github.com/mathics/Mathics/blob/master/setup.py
> > https://github.com/mathics/Mathics/blob/master/requirements-full.txt
> As said (and in aforementioned SlackBuilds) it's Mathics3 now:
> http://github.com/Mathics3/mathics-core , so no longer that simple; I
> stated last October it no longer uses setup.py.
>

It's really just a matter of going through the dependencies listed in the
now pyproject.toml, try building, and see if it complains. Once all the
complaints are resolved and it builds, install it, and use `pip check` to
see what else is missing that it's asking for. Install those, and then try
running the program to see if it complains again. Then just make sure the
dependencies are documented in the .info file.

I had some free time this evening, so I tried my hand at this. I created a
SlackBuild for mathics-core (using my SlackBuild generator script
<https://github.com/bassmadrigal/scripts/blob/master/sbgen.sh> --
*shameless plug*). After running that, I removed the setup.py entries (from
the template) and ran the script. It complained about setuptools being too
old and missing mathics-scanner. So I added a dependency to mathics-scanner
and python3-setuptools-opt and added the command in the script to update
the python path for the newer setuptools.

Then I created a script for mathics-scanner using the same slackbuild
generator script and went through the same process as I previously did.
Once mathics-scanner compiled, I went back to mathics-core and went through
that process futher.

Ultimately, I found that mathics-core requires a few packages not on SBo
yet (palettable, pint, & pympler, which I've listed with "@" around them in
the mathics-core.info) and it complained about an outdated pillow version.
For testing, I installed them using pip (in an otherwise clean environment
that I can reset easily to not have python modules installed via pip in
normal operation), and was able to finally start up mathics without error.
However, I know absolutely nothing about mathics and don't know what to run
to check if it's working properly. I have no idea if having an outdated
version of pillow (stock 15.0 package) will cause any issues with output,
so that would certainly need to be tested further.

I made a zip file of these two SlackBuilds and attached it (if it isn't
blocked) and put it on my server
<http://bassmadrigal.duckdns.org/mathics.tar.gz> (for at least a few weeks
until I go through and purge unneeded files in there) if you're interested
in creating SlackBuilds for pint and palettable and can otherwise test if
mathics works once those dependencies are met. I won't be willing to
maintain these SlackBuilds since I don't use mathics and wouldn't know how
to test it, so feel free to take over if you (or someone else) is
interested in continuing it.

If you have any questions, I'll try to answer them the best I can.

Jeremy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.slackbuilds.org/pipermail/slackbuilds-users/attachments/20250107/e0909164/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mathics.tar.gz
Type: application/gzip
Size: 3232 bytes
Desc: not available
URL: <http://lists.slackbuilds.org/pipermail/slackbuilds-users/attachments/20250107/e0909164/attachment-0001.bin>


More information about the SlackBuilds-users mailing list