diff --git a/RELEASE b/RELEASE index 58deacd..ed62ad4 100644 --- a/RELEASE +++ b/RELEASE @@ -7,8 +7,8 @@ Oder/Manual release instructions: * Commit and open PR on Github to see that all tests pass, and then merge the PR. * Check out master locally -* Build wheel - python setup.py sdist upload +* Build sdist and wheel + python -m build * Check long description twine check dist/* * Upload to pypi-test diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..7c11b95 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,47 @@ +[build-system] +build-backend = "setuptools.build_meta" +requires = ["setuptools>=77"] + +[project] +authors = [{name = "Michael Weiss and other contributors", email = "code@mweiss.ch"}] +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Scientific/Engineering :: Artificial Intelligence", + "Operating System :: OS Independent", +] +dependencies = ["pylatexenc~=2.10"] +description = "Bibtex parser for python 3" +dynamic = ["version"] +license = "MIT" +license-files = ["LICENSE"] +maintainers = [{name = "Michael Weiss", email = "code@mweiss.ch"}] +name = "bibtexparser" +readme = "README.md" +requires-python = ">=3.9" + +[project.optional-dependencies] +docs = ["sphinx"] +test = [ + "pytest", # Test runner + "pytest-xdist", # Parallel tests: `pytest -n ` + "pytest-cov", # Code coverage + "jupyter", # For runnable examples +] + +[project.urls] +Homepage = "https://github.com/sciunto-org/python-bibtexparser" +Repository = "https://github.com/sciunto-org/python-bibtexparser" + +[tool.setuptools.dynamic] +version = {attr = "bibtexparser.__version__"} + +[tool.setuptools.package-data] +bibtexparser = ["py.typed"] + +[tool.setuptools.packages.find] +include = ["bibtexparser", "bibtexparser.*"] diff --git a/setup.py b/setup.py deleted file mode 100644 index d0480ea..0000000 --- a/setup.py +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/env python -import setuptools - -version = None - -with open("bibtexparser/__init__.py") as fh: - for line in fh: - if line.startswith("__version__"): - version = line.strip().split()[-1][1:-1] - break - if not version: - raise RuntimeError("Could not determine version") - - -def load_readme(): - with open("README.md") as f: - return f.read() - - -setuptools.setup( - name="bibtexparser", - version=version, - url="https://github.com/sciunto-org/python-bibtexparser", - author="Michael Weiss and other contributors", - maintainer="Michael Weiss", - license="MIT", - author_email="code@mweiss.ch", - maintainer_email="code@mweiss.ch", - description="Bibtex parser for python 3", - long_description_content_type="text/markdown", - long_description=load_readme(), - python_requires=">=3.9", - packages=setuptools.find_packages(include=["bibtexparser", "bibtexparser.*"]), - package_data={"bibtexparser": ["py.typed"]}, - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Topic :: Scientific/Engineering :: Artificial Intelligence", - "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent", - ], - install_requires=[ - "pylatexenc~=2.10", - ], - extras_require={ - "test": [ - "pytest", # Test runner - "pytest-xdist", # Parallel tests: `pytest -n ` - "pytest-cov", # Code coverage - "jupyter", # For runnable examples - ], - "docs": [ - "sphinx", - ], - }, -)