From d2b04fbedcaef042a098ed248605d00ff88ab6ae Mon Sep 17 00:00:00 2001 From: Tom Mitchell Date: Fri, 7 Aug 2026 10:10:42 -0400 Subject: [PATCH] Switch to pyproject.toml Modernize the package by removing setup.py and replacing it with pyproject.toml. Also make the build and documentation status badges link to their respective artifacts. --- README.md | 4 ++-- pyproject.toml | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++ setup.py | 46 ---------------------------------------- 3 files changed, 59 insertions(+), 48 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/README.md b/README.md index c08b0a5..a209ad7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # pySBOL2 -![gh-action badge](https://github.com/SynBioDex/pySBOL2/workflows/Python%20package/badge.svg) -![readthedocs badge](https://readthedocs.org/projects/pysbol2/badge/) +[![gh-action badge](https://github.com/SynBioDex/pySBOL2/workflows/Python%20package/badge.svg)](https://github.com/SynBioDex/pySBOL2/actions/workflows/python-package.yml) +[![readthedocs badge](https://readthedocs.org/projects/pysbol2/badge/)](https://pysbol.readthedocs.io) **pySBOL2** is a pure Python implementation of the SBOL 2.3.0 standard [Synthetic Biology Open Language (SBOL)](https://sbolstandard.org/) - diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..959b2e1 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,57 @@ +[build-system] +build-backend = "setuptools.build_meta" +requires = [ "setuptools>=80.1" ] + +[project] +name = "sbol2" +description = "Pure Python implementation of SBOL 2 standard" +readme = "README.md" +keywords = [ + "biology", + "synthetic biology", +] +license = "Apache-2.0" +authors = [ + { name = "Bryan Bartley", email = "editors@sbolstandard.org" }, +] +requires-python = ">=3.11" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", +] +dynamic = [ "version" ] +dependencies = [ + "deprecated", + "lxml", + # As of August 2026 the code is incompatible with packaging >= 26.1 + # https://github.com/SynBioDex/pySBOL2/issues/450 + "packaging<26.1", + "python-dateutil", + "rdflib>=5", + "requests", + "urllib3", +] +urls.changelog = "https://github.com/SynBioDex/pySBOL2/blob/master/CHANGELOG.md" +urls.documentation = "https://pysbol.readthedocs.io/" +urls.homepage = "https://github.com/SynBioDex/pySBOL2" +urls.issues = "https://github.com/SynBioDex/pySBOL2/issues" +urls.source = "https://github.com/SynBioDex/pySBOL2.git" + +[dependency-groups] +# Install with pip: "python3 -m pip install --group dev" +# Install with uv: "uv sync --all-groups" or "uv sync --group dev" +dev = [ + "pycodestyle>=2.14", + "ruff>=0.16.1", +] + +[tool.setuptools] +packages = [ "sbol2" ] +# Include libSBOLj.jar in the distribution +package-data.sbol2 = [ "libSBOLj.jar" ] +dynamic.version = { attr = "sbol2.__version__" } diff --git a/setup.py b/setup.py deleted file mode 100644 index 057b8dd..0000000 --- a/setup.py +++ /dev/null @@ -1,46 +0,0 @@ -from setuptools import setup - -setup(name='sbol2', - version='1.5', - description='Pure Python implementation of SBOL 2 standard', - python_requires='>=3.11', - url='https://github.com/SynBioDex/pySBOL2', - author='Bryan Bartley', - author_email='editors@sbolstandard.org', - license='Apache-2', - # See https://pypi.python.org/pypi?%3Aaction=list_classifiers - classifiers=[ - # How mature is this project? Common values are - # 3 - Alpha - # 4 - Beta - # 5 - Production/Stable - 'Development Status :: 5 - Production/Stable', - - # Indicate who your project is intended for - 'Intended Audience :: Developers', - - # Pick your license as you wish (should match "license" above) - 'License :: OSI Approved :: Apache Software License', - - # Specify the Python versions you support here. In particular, ensure - # that you indicate whether you support Python 2, Python 3 or both. - 'Programming Language :: Python :: 3' - ], - # What does your project relate to? - keywords='synthetic biology', - packages=['sbol2'], - install_requires=[ - 'rdflib>=5.0', - 'python-dateutil', - 'deprecated', - 'lxml', - 'requests', - 'urllib3', - # As of August 2026 the code is incompatible with packaging >= 26.1 - # https://github.com/SynBioDex/pySBOL2/issues/450 - 'packaging<26.1' - ], - package_data={'sbol2': ['libSBOLj.jar']}, - tests_require=[ - 'pycodestyle>=2.6.0' - ])