diff --git a/.github/workflows/consistency-checks.yml b/.github/workflows/consistency-checks.yml index e19a0a0..2057881 100644 --- a/.github/workflows/consistency-checks.yml +++ b/.github/workflows/consistency-checks.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.11'] + python-version: ['3.13'] steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} @@ -26,6 +26,7 @@ jobs: git clone https://github.com/Mathics3/mathics-core (cd mathics-core && make) (cd mathics-core && python -m pip install -e .[full]) + python -m pip install -e git+https://github.com/Mathics3/Mathics3-Module-Base#egg=Mathics3-Module-Base - name: Install Pymathics.graph with minimum dependencies run: | make develop diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 992e08c..f939b71 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.9', '3.10', '3.11', '3.12'] + python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} @@ -22,11 +22,13 @@ jobs: run: | python -m pip install --upgrade pip python -m pip install pytest - # Can comment out when next Mathics core and Mathics-scanner are released - # python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full] - # python -m pip install -e git+https://github.com/Mathics3/mathics-core#egg=Mathics3[full] + # Go over and comment out stuff when next Mathics core and Mathics-scanner are released + python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full] + git clone https://github.com/Mathics3/mathics-core + (cd mathics-core && pip3 install -e .[full]) + (cd mathics-core && bash ./admin-tools/make-JSON-tables.sh) + python -m pip install -e git+https://github.com/Mathics3/Mathics3-Module-Base#egg=Mathics3-Module-Base python -m pip install -e . - # (cd src/mathics3 && bash ./admin-tools/make-JSON-tables.sh) - name: install pymathics graph run: | make develop diff --git a/.gitignore b/.gitignore index e6af09c..302ff90 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ /.hypothesis /.python-version /ChangeLog +/ChangeLog.spell-corrected /Mathics3_graph.egg-info /build /dist diff --git a/pymathics/graph/version.py b/pymathics/graph/version.py index 424b12c..8f117f2 100644 --- a/pymathics/graph/version.py +++ b/pymathics/graph/version.py @@ -5,4 +5,4 @@ # well as importing into Python. That's why there is no # space around "=" below. # fmt: off -__version__="8.0.1" # noqa +__version__="8.0.2dev0" # noqa diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..2fd5155 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,66 @@ +[build-system] +requires = [ + "setuptools>=70.0.0", # CVE-2024-38335 recommends this + "networkx>=3.0.0", + "pydot", + "mpmath>=1.2.0", + "numpy<1.27", + "matplotlib", + "scipy>=1.10.0", + "sympy>=1.11,<1.13", +] +build-backend = "setuptools.build_meta" + +[project] +name = "Mathics3-graph" +description = "Mathics3 Graph Module using NetworkX" +dependencies = [ + "Mathics3>=8.0.1", + "Mathics3-Module-Base", + "networkx>=3.0.0", + "pydot", + "matplotlib", + "scipy>=1.10.0", +] +requires-python = ">=3.9" # Sympy 1.11 is supported only down to 3.8 +readme = "README.rst" +license = {text = "GPL"} +keywords = ["Mathematica", "Wolfram", "Interpreter", "Shell", "Math", "CAS"] +maintainers = [ + {name = "Mathics Group", email = "mathics-devel@googlegroups.com"}, +] +classifiers = [ + "Intended Audience :: Developers", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", + "Programming Language :: Python", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Scientific/Engineering", + "Topic :: Scientific/Engineering :: Mathematics", + "Topic :: Software Development :: Interpreters", +] +dynamic = ["version"] + +[project.urls] +Homepage = "https://github.com/Mathics3/pymathics-graph" +Downloads = "https://github.com/Mathics3/pymathics-graph/releases" + +[project.optional-dependencies] +dev = [ + "pytest", +] + +[tool.setuptools] +packages = [ + "pymathics.graph", +] + +[tool.setuptools.dynamic] +version = {attr = "pymathics.graph.__version__"} diff --git a/setup.py b/setup.py deleted file mode 100644 index c34febd..0000000 --- a/setup.py +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -import os.path as osp -import platform -import sys - -from setuptools import find_namespace_packages, setup - -# Ensure user has the correct Python version -if sys.version_info < (3, 8): - print("Mathics support Python 3.8 and above; you have %d.%d" % sys.version_info[:2]) - sys.exit(-1) - - -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("pymathics/graph/version.py").read(), "version.py", "exec")) -long_description = read("README.rst") + "\n" - -is_PyPy = platform.python_implementation() == "PyPy" - -setup( - name="pymathics-graph", - version=__version__, # noqa - packages=find_namespace_packages(include=["pymathics.*"]), - install_requires=[ - "Mathics3>=8.0.0", - "networkx>=3.0.0", - "pydot", - "matplotlib", - "scipy>=1.10.0", - ], - # don't pack Mathics in egg because of media files, etc. - zip_safe=False, - maintainer="Mathics3 Group", - maintainer_email="rb@dustyfeet.com", - long_description=long_description, - long_description_content_type="text/x-rst", - # metadata for upload to PyPI - classifiers=[ - "Intended Audience :: Developers", - "Intended Audience :: Science/Research", - "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", - "Programming Language :: Python", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Scientific/Engineering", - "Topic :: Scientific/Engineering :: Mathematics", - "Topic :: Software Development :: Interpreters", - ], - # TODO: could also include long_description, download_url, -)