From f1cf2802051b4f7abd1fff540e9e925041dc6fd8 Mon Sep 17 00:00:00 2001 From: "R. Sarmiento" Date: Tue, 23 Jun 2026 15:03:42 +0200 Subject: [PATCH 1/2] use pyproject.toml --- pyproject.toml | 27 +++++++++++++++++++++++++++ setup.py | 30 ------------------------------ 2 files changed, 27 insertions(+), 30 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..1f63716 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,27 @@ +[build-system] +requires = ["setuptools>=61"] +build-backend = "setuptools.build_meta" + +[project] +name = "ipcmagic" +dynamic = ["version"] +description = "IPyParallel magics for Jupyter notebooks" +readme = "README.md" +license = "BSD-3-Clause" + +dependencies = [ + "ipython>=6.3.0", + "docopt>=0.6.2", + "ipyparallel>=8.2.1", +] + +[project.optional-dependencies] +dask = [ + "dask[complete]>=2022.05.0" +] + +[project.urls] +Homepage = "https://github.com/eth-cscs/ipcluster_magic" + +[tool.setuptools.dynamic] +version = {attr = "ipcmagic.version.VERSION"} diff --git a/setup.py b/setup.py deleted file mode 100644 index 4c73986..0000000 --- a/setup.py +++ /dev/null @@ -1,30 +0,0 @@ -import os -from setuptools import setup - - -version_py = os.path.join(os.path.dirname(__file__), 'ipcmagic', 'version.py') -version = {} -with open(version_py) as fp: - exec(fp.read(), version) - -with open("README.md", "r", encoding="utf-8") as fp: - long_description = fp.read() - -setup( - name='ipcmagic-cscs', - version=version['VERSION'], - packages=['ipcmagic'], - url='https://github.com/eth-cscs/ipcluster_magic', - license='BSD 3-Clause', - description='IPyParallel magics for Jupyter notebooks', - long_description=long_description, - long_description_content_type='text/markdown', - install_requires=[ - 'ipython>=6.3.0', - 'docopt>=0.6.2', - 'ipyparallel>=8.2.1', - ], - extras_require={ - "dask": ['dask[complete]>=2022.05.0'] - } -) From d76c7ccb8cfcf4648e0726035cfbed18f6d98277 Mon Sep 17 00:00:00 2001 From: "R. Sarmiento" Date: Tue, 23 Jun 2026 15:16:30 +0200 Subject: [PATCH 2/2] update workflow --- .github/workflows/python-publish.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index c9eb632..3e0b56d 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -18,23 +18,28 @@ permissions: jobs: deploy: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: - python-version: '3.x' - - name: Install dependencies + python-version: "3.x" + + - name: Install build tools run: | python -m pip install --upgrade pip - pip install build + pip install build twine + - name: Build package run: python -m build + + - name: Check package + run: twine check dist/* + - name: Publish package - uses: pypa/gh-action-pypi-publish@master + uses: pypa/gh-action-pypi-publish@release/v1 with: verbose: true user: __token__