diff --git a/.github/workflows/osx.yml b/.github/workflows/osx.yml index f0153e8..2e773d4 100644 --- a/.github/workflows/osx.yml +++ b/.github/workflows/osx.yml @@ -4,7 +4,7 @@ on: push: branches: [ master ] pull_request: - branches: [ master ] + branches: '**' jobs: build: @@ -12,7 +12,7 @@ jobs: strategy: matrix: os: [macOS] - python-version: [3.8, 3.9, 3.10, 3.11] + python-version: ['3.11', '3.12', '3.13'] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} @@ -23,12 +23,16 @@ jobs: run: | brew install llvm python -m pip install --upgrade pip - pip install pytest - # Can remove after next Mathics-core release - # python -m pip install -e git+https://github.com/Mathics3/mathics-core#egg=Mathics3[full] - - name: Install pymathics.hello + python -m pip install pytest + # 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 + - name: Install Mathic3 Hello Module run: | - pip install -e . - - name: Test Mathics + python -m pip install -e . + - name: Test Mathics3 Hello Module run: | make check diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index bc95807..f1f489e 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -4,29 +4,33 @@ on: push: branches: [ master ] pull_request: - branches: [ master ] + branches: '**' jobs: build: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.9, 3.11] + python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m pip install --upgrade pip - pip install pytest - # Can remove after next Mathics-core release - # python -m pip install -e git+https://github.com/Mathics3/mathics-core#egg=Mathics3[full] - - name: Install pymathics.hello + python -m pip install pytest + # 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 + - name: install Mathic3 Hello Module run: | - pip install -e . - - name: Test Mathics + python -m pip install -e . + - name: Test Mathics3 Hello Module run: | make check diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 78841cd..35a6baf 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -4,7 +4,7 @@ on: push: branches: [ master ] pull_request: - branches: [ master ] + branches: '**' jobs: build: @@ -12,7 +12,7 @@ jobs: strategy: matrix: os: [windows] - python-version: [ 3.9, 3.11] + python-version: ['3.9', '3.11', '3.12'] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} @@ -22,13 +22,17 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install wheel - pip install pytest - # Can remove after next Mathics-core release - # python -m pip install -e git+https://github.com/Mathics3/mathics-core#egg=Mathics3[full] - - name: Install pymathics.hello + python -m pip install pytest + python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner + git clone --depth 1 https://github.com/Mathics3/mathics-core mathics-core + cd mathics-core + python -m pip install -e . + bash admin-tools/make-JSON-tables.sh + cd .. + python -m pip install -e git+https://github.com/Mathics3/Mathics3-Module-Base#egg=Mathics3-Module-Base + - name: Install Mathic3 Hello Module run: | - pip install -e . + python -m pip install -e . - name: Test Mathics run: | make check diff --git a/.gitignore b/.gitignore index 5228a30..97f6ed7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ *~ /.python-version /ChangeLog +/ChangeLog-spell-corrected +/Mathics3_hello.egg-info /build /dist /pymathics_hello.egg-info diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d73159b..d2aad7b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,9 +6,9 @@ repos: hooks: - id: check-merge-conflict - id: debug-statements - stages: [commit] + stages: [pre-commit] - id: end-of-file-fixer - stages: [commit] + stages: [pre-commit] # - repo: https://github.com/pycqa/isort # rev: 5.10.1 # hooks: @@ -20,9 +20,9 @@ repos: - id: black language_version: python3 exclude: 'pymathics/hello/version.py' - stages: [commit] + stages: [pre-commit] - repo: https://github.com/pycqa/flake8 rev: 3.9.2 hooks: - id: flake8 - stages: [commit] + stages: [pre-commit] diff --git a/pymathics/hello/version.py b/pymathics/hello/version.py index cc1f721..6de05f6 100644 --- a/pymathics/hello/version.py +++ b/pymathics/hello/version.py @@ -5,4 +5,4 @@ # well as importing into Python. That's why there is no # space around "=" below. # fmt: off -__version__="7.0.0" # noqa +__version__="7.0.1dev0" # noqa diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..efe3525 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,58 @@ +[build-system] +requires = [ + "setuptools>=70.0.0", # CVE-2024-38335 recommends this + "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-hello" +description = 'Mathics3 Hello, World! module' +dependencies = [ + "Mathics3-Module-Base", +] +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 :: 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-hello" +Downloads = "https://github.com/Mathics3/pymathics-hello/releases" + +[project.optional-dependencies] +dev = [ + "pytest", +] + +[tool.setuptools] +packages = [ + "pymathics.hello", +] + +[tool.setuptools.dynamic] +version = {attr = "pymathics.hello.__version__"} diff --git a/setup.py b/setup.py deleted file mode 100644 index 35231b0..0000000 --- a/setup.py +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -import sys -import platform -import os.path as osp -from setuptools import setup, find_namespace_packages - -# 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/hello/version.py").read(), "version.py", "exec")) -long_description = read("README.rst") + "\n" - -is_PyPy = platform.python_implementation() == "PyPy" - -setup( - name="pymathics-hello", - maintainer="Mathics Group", - maintainer_email="mathics-devel@googlegroups.com", - long_description=long_description, - long_description_content_type="text/x-rst", - version=__version__, # noqa - packages=find_namespace_packages(include=["pymathics.*"]), - install_requires=["Mathics3>=7.0.0.dev0"], - # don't pack Mathics in egg because of media files, etc. - zip_safe=False, - # 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.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "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, -)