diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
index 656b39705..a8230b43d 100644
--- a/.github/workflows/macos.yml
+++ b/.github/workflows/macos.yml
@@ -1,4 +1,4 @@
-name: Mathics-Django (macos)
+name: Mathics3-django (MacOS)
on:
push:
@@ -20,9 +20,8 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install OS dependencies
run: |
- brew install llvm nodejs npm tesseract
+ brew install llvm@14 nodejs npm tesseract
python -m pip install --upgrade pip
- LLVM_CONFIG=/usr/local/Cellar/llvm@11/11.1.0/bin/llvm-config pip install llvmlite
- name: Install Python dependencies
run: |
# Can adjust when next Mathics3 is released
@@ -39,7 +38,9 @@ jobs:
npm install
- name: Install Mathics3 Django
run: |
- pip install -e .[full]
+ # We will do full after release of the various Mathics3 Modules
+ # pip install -e .[full]
+ pip install -e .
make develop
- name: Test Mathics3 Django
run: |
diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml
index 306fd569d..461acefc8 100644
--- a/.github/workflows/ubuntu.yml
+++ b/.github/workflows/ubuntu.yml
@@ -1,4 +1,4 @@
-name: Mathics-Django (ubuntu)
+name: Mathics3-django (ubuntu)
on:
push:
@@ -39,7 +39,9 @@ jobs:
npm install
- name: Install Mathics3 Django
run: |
- python -m pip install -e .[full]
+ # We will do full after release of the various Mathics3 Modules
+ # python -m pip install -e .[full]
+ python -m pip install -e .
make develop
- name: Test Mathics3 Django
run: |
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index 339c890ce..780ea3726 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -1,4 +1,5 @@
-name: Mathics (Windows)
+# -*- yaml -*-
+name: Mathics3-django (Windows)
on:
push:
@@ -43,7 +44,9 @@ jobs:
run: |
cp node_modules/\@mathicsorg/mathics-threejs-backend/docs/build.js mathics_django/web/media/js/mathics-threejs-backend/index.js
cp node_modules/\@mathicsorg/mathics-threejs-backend/package.json mathics_django
- python -m pip install -e .[full]
+ # We will do full after release of the various Mathics3 Modules
+ # python -m pip install -e .[full]
+ python -m pip install -e .
- name: Test Mathics3 Django
run: |
make pytest gstest
diff --git a/.gitignore b/.gitignore
index 604ffef6b..df4405b22 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,6 +17,7 @@
/.python-version
/ChangeLog-spell-corrected
/ChangeLog.orig
+/Mathics3_Django.egg-info
/Mathics_Django.egg-info
/node_modules
/package-lock.json
diff --git a/mathics_django/version.py b/mathics_django/version.py
index 44002f85a..6e4862945 100644
--- a/mathics_django/version.py
+++ b/mathics_django/version.py
@@ -4,4 +4,4 @@
# well as importing into Python. That's why there is no
# space around "=" below.
# fmt: off
-__version__="9.0.1.dev0" # noqa
+__version__="10.0.0.dev0" # noqa
diff --git a/mathics_django/web/templates/about.html b/mathics_django/web/templates/about.html
index 2151821e6..9b8da1e20 100644
--- a/mathics_django/web/templates/about.html
+++ b/mathics_django/web/templates/about.html
@@ -165,7 +165,7 @@
Mathics3 is a general-purpose computer algebra system.
-
Welcome to Mathics3 (in Django)!
-
Copyright (C) 2021-2025 The Mathics3 Team
+
Copyright (C) 2021-2026 The Mathics3 Team
This program comes with ABSOLUTELY NO WARRANTY;
This is free software, and you are welcome to redistribute it
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 000000000..de4fd6ea7
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,65 @@
+[build-system]
+requires = ["setuptools"]
+
+build-backend = "setuptools.build_meta"
+
+[project]
+name = "Mathics3-Django"
+description = "A Django-based frontend for Mathics3"
+dependencies = [
+ "Django >=3.1",
+ "Mathics3 >9",
+ "Mathics_Scanner > 9",
+ "pygments", # For colorized Python tracebacks
+ "requests",
+ "scikit-image; sys_platform == 'darwin'",
+]
+requires-python = ">=3.10"
+readme = "README.rst"
+license = "GPL-3.0-or-later"
+maintainers = [
+ {name = "Mathics3 Group"},
+]
+classifiers = [
+ "Framework :: Django",
+ "Intended Audience :: Science/Research",
+ "Operating System :: OS Independent",
+ "Programming Language :: Python :: 3",
+ "Topic :: Scientific/Engineering :: Mathematics",
+]
+dynamic = ["version"]
+
+[project.optional-dependencies]
+dev = [
+ "pytest",
+ "pytest-django"
+]
+
+full = [
+ "Mathics3-Module-PyICU",
+ "Mathics3-Module-nltk",
+ "Mathics3-Module-networkx",
+]
+
+
+[project.scripts]
+Mathics3server = "mathics_django.manage:main"
+
+[project.urls]
+Homepage = "https://mathics.org/"
+
+[tool.setuptools.package-data]
+include = [
+ "mathics_django/autoload/*.m",
+ "mathics_django/doc/*.pcl",
+ "mathics_django/web/media/css/*.css",
+ "mathics_django/web/media/img/**/*",
+ "mathics_django/web/media/fonts/**/*",
+ "mathics_django/web/media/js/**/*.js",
+ "mathics_django/web/media/js/mathics-threejs-backend/**/*",
+ "mathics_django/web/templates/**/*.html",
+ "mathics_django/web/media/js/mathjax/**/*"
+]
+
+[tool.setuptools.dynamic]
+version = {attr = "mathics_django.version.__version__"}
diff --git a/setup.py b/setup.py
index 6540e1010..7019d8069 100644
--- a/setup.py
+++ b/setup.py
@@ -1,206 +1,10 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-"""Setuptools based setup script for the Django front end to Mathics.
+from setuptools import find_packages, setup
-For the easiest installation just type the following command (you'll probably
-need root privileges):
-
- python setup.py install
-
-This will install the library in the default location. For instructions on
-how to customize the install procedure read the output of:
-
- python setup.py --help install
-
-In addition, there are some other commands:
-
- python setup.py clean -> will clean all trash (*.pyc and stuff)
-
-To get a full list of available commands, read the output of:
-
- python setup.py --help-commands
-
-Or, if all else fails, feel free to write to the mathics users list at
-mathics-users@googlegroups.com and ask for help.
-"""
-
-import os.path as osp
-import platform
-import re
-import sys
-
-from setuptools import Command, setup
-
-
-def get_srcdir():
- filename = osp.normcase(osp.dirname(osp.abspath(__file__)))
- return osp.realpath(filename)
-
-
-def read(*rnames):
- return open(osp.join(get_srcdir(), *rnames)).read()
-
-
-# stores __version__ in the current namespace
-exec(
- compile(
- open("mathics_django/version.py").read(), "mathics_django/version.py", "exec"
+if __name__ == "__main__":
+ setup(
+ packages=find_packages(),
+ include_package_data=True,
)
-)
-
-# Get/set VERSION and long_description from files
-long_description = read("README.rst") + "\n"
-
-
-is_PyPy = platform.python_implementation() == "PyPy" or hasattr(
- sys, "pypy_version_info"
-)
-
-DEPENDENCY_LINKS = []
-INSTALL_REQUIRES = []
-
-if sys.platform == "darwin":
- INSTALL_REQUIRES += ["scikit-image"]
-
-# General Requirements
-INSTALL_REQUIRES += [
- "Mathics-Scanner >2.0",
- "Mathics3 >9.1",
- "django",
- "matplotlib", # For networkx graphs
- "networkx >= 3.0",
- "pygments", # For colorized Python tracebacks
- "requests",
-]
-
-
-def subdirs(root, file="*.*", depth=10):
- for k in range(depth):
- yield root + "*/" * k + file
-
-
-class initialize(Command):
- """
- Manually create the Django database used by the web notebook
- """
-
- description = "manually create the Django database used by the web notebook"
- user_options = [] # distutils complains if this is not here.
-
- def __init__(self, *args):
- self.args = args[0] # so we can pass it to other classes
- Command.__init__(self, *args)
-
- def initialize_options(self): # distutils wants this
- pass
-
- def finalize_options(self): # this too
- pass
-
- def run(self):
- import os
- import subprocess
-
- settings = {}
- exec(
- compile(
- open("mathics_django/settings.py").read(),
- "mathics-django/settings.py",
- "exec",
- ),
- settings,
- )
-
- database_file = settings["DATABASES"]["default"]["NAME"]
- print("Creating data directory %s" % settings["DATA_DIR"])
- if not osp.exists(settings["DATA_DIR"]):
- os.makedirs(settings["DATA_DIR"])
- print("Creating database %s" % database_file)
- try:
- subprocess.check_call(
- [sys.executable, "mathics_django/manage.py", "migrate", "--noinput"]
- )
- print("")
- print("Database created successfully.")
- except subprocess.CalledProcessError:
- print("Error: failed to create database")
- sys.exit(1)
-
-
-mathjax_files = list(subdirs("media/js/mathjax/"))
-
-extra_requires = []
-for line in open("requirements-full.txt").read().split("\n"):
- if line and not line.startswith("#"):
- requires = re.sub(r"([^#]+)(\s*#.*$)?", r"\1", line)
- extra_requires.append(requires)
-
-EXTRA_REQUIRES = {"full": extra_requires}
-
-setup(
- name="Mathics-Django",
- version=__version__,
- packages=[
- "mathics_django",
- "mathics_django.doc",
- "mathics_django.web",
- "mathics_django.web.controllers",
- "mathics_django.web.templatetags",
- "mathics_django.web.migrations",
- ],
- install_requires=INSTALL_REQUIRES,
- extras_require=EXTRA_REQUIRES,
- dependency_links=DEPENDENCY_LINKS,
- package_data={
- "mathics_django": ["autoload/*.m"],
- "mathics_django.doc": ["*.pcl"],
- "mathics_django.web": [
- "media/css/*.css",
- "media/img/*.*",
- "media/fonts/*",
- "media/img/favicons/*",
- "media/js/innerdom/*.js",
- "media/js/mathics-threejs-backend/*",
- "media/js/prototype/*.js",
- "media/js/scriptaculous/*.js",
- "media/js/*.js",
- "templates/*.html",
- "templates/doc/*.html",
- ]
- + mathjax_files,
- },
- entry_points={
- "console_scripts": [
- "mathicsserver = mathics_django.server:main",
- ],
- },
- long_description=long_description,
- long_description_content_type="text/x-rst",
- # don't pack Mathics in egg because of media files, etc.
- zip_safe=False,
- # metadata for upload to PyPI
- maintainer="Mathics3 Group",
- maintainer_email="mathics-devel@googlegroups.com",
- description="A Django front end for Mathics3.",
- license="GPL",
- url="https://mathics.org/",
- keywords=["Mathematica", "Wolfram", "Interpreter", "Shell", "Math", "CAS"],
- classifiers=[
- "Intended Audience :: Developers",
- "Intended Audience :: Science/Research",
- "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
- "Programming Language :: Python",
- "Programming Language :: Python :: 3.10",
- "Programming Language :: Python :: 3.11",
- "Programming Language :: Python :: 3.12",
- "Programming Language :: Python :: 3.13",
- "Programming Language :: Python :: Implementation :: CPython",
- "Programming Language :: Python :: Implementation :: PyPy",
- "Topic :: Scientific/Engineering",
- "Topic :: Scientific/Engineering :: Mathematics",
- "Topic :: Scientific/Engineering :: Physics",
- "Topic :: Software Development :: Interpreters",
- ],
- # TODO: could also include long_description, download_url,
-)