diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f55a3c3..3f13dcf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,6 +10,11 @@ on: permissions: read-all +concurrency: + # Cancel previous runs of this workflow for the same branch + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: test: runs-on: ubuntu-20.04 @@ -29,7 +34,7 @@ jobs: conda list - name: Install pari-jupyter shell: bash -l {0} - run: pip install --verbose --no-index . + run: pip install --verbose --no-build-isolation . - name: Run test shell: bash -l {0} run: | diff --git a/.gitignore b/.gitignore index a54f9df..eeeaf99 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ dist MANIFEST *.c *.pyc +*.egg-info diff --git a/MANIFEST.in b/MANIFEST.in index 317d32b..0a28c2e 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,2 @@ -include LICENSE README.rst MANIFEST.in -recursive-include PARIKernel *.py *.pyx *.pxd *.c +recursive-include PARIKernel *.py *.pyx *.pxd +recursive-exclude PARIKernel *.c diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..98c9b11 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,37 @@ +[build-system] +requires = ["setuptools", + "Cython>=0.29"] +build-backend = "setuptools.build_meta" + +[project] +name = "pari-jupyter" +description = "A Jupyter kernel for PARI/GP" +authors = [ + {name = "Jeroen Demeyer"}, +] +maintainers = [ + {name = "SageMath developers", email = "sage-devel@googlegroups.com"}, +] +dependencies = [ + "ipykernel", +] +requires-python = ">=3.8" +readme = "README.rst" +license = {text = "GNU General Public License (GPL) version 3 or later"} +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", + "Operating System :: POSIX", + "Programming Language :: Cython", + "Topic :: Scientific/Engineering :: Mathematics", +] +dynamic = [ + "version", +] + +[project.urls] +Homepage = "https://github.com/sagemath/pari-jupyter" + +[tool.setuptools.dynamic] +version = {file = "VERSION"} diff --git a/setup.py b/setup.py index 1836e9c..237e83a 100755 --- a/setup.py +++ b/setup.py @@ -4,7 +4,6 @@ from glob import glob from setuptools import setup, Extension from setuptools.command.bdist_egg import bdist_egg as _bdist_egg -import PARIKernel kernelpath = os.path.join("share", "jupyter", "kernels", "pari_jupyter") nbextpath = os.path.join("share", "jupyter", "nbextensions", "gp-mode") @@ -45,25 +44,6 @@ def run(self): setup( - name='pari-jupyter', - version=PARIKernel.__version__, - description='A Jupyter kernel for PARI/GP', - long_description=open("README.rst").read(), - long_description_content_type='text/x-rst', - platforms=["POSIX"], - author='Jeroen Demeyer', - author_email='pari-users@pari.math.u-bordeaux.fr', - license='GNU General Public License (GPL) version 3 or later', - url="https://github.com/sagemath/pari-jupyter", - classifiers=["Development Status :: 5 - Production/Stable", - "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", - "Operating System :: POSIX", - "Programming Language :: Cython", - "Intended Audience :: Science/Research", - "Topic :: Scientific/Engineering :: Mathematics", - ], - install_requires=['ipykernel'], - packages=['PARIKernel'], ext_modules=extensions, data_files=[(kernelpath, glob("spec/*")),