From 407e17d5a4aa7409bf6caaea2115f45e92f5faa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matth=C3=A4us=20G=2E=20Chajdas?= Date: Mon, 19 Aug 2024 17:38:52 +0200 Subject: [PATCH] Update build configuration. Replace `setuptools` with `pyproject.toml` and hatchling. --- .gitignore | 3 ++- lina/__init__.py | 2 +- pyproject.toml | 69 ++++++++++++++++++++++++++++++++++++++++++++++++ setup.cfg | 5 ---- setup.py | 37 -------------------------- tox.ini | 18 ------------- 6 files changed, 72 insertions(+), 62 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.cfg delete mode 100644 setup.py delete mode 100644 tox.ini diff --git a/.gitignore b/.gitignore index a6234f9..f93bad9 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ htmlcov/* .coverage .pytest* .vscode* -.venv +.venv/ +dist/ diff --git a/lina/__init__.py b/lina/__init__.py index 0601062..5c42d65 100644 --- a/lina/__init__.py +++ b/lina/__init__.py @@ -2,7 +2,7 @@ # @author: Matthäus G. Chajdas # @license: 2-clause BSD -__version__ = '1.0.10' +__version__ = '1.0.11' import io import os diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..e7b4e33 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,69 @@ +[project] +name = "Lina" +dynamic = ["version"] + +authors = [ + {name = "Matthäus G. Chajdas", email = "dev@anteru.net" } +] + +description = "Text template library" +readme = {file = "README.md", content-type = "text/markdown"} +license = {text = "BSD 2-clause license"} + +keywords = ["SJSON"] +classifiers = [ + "Development Status :: 6 - Mature", + "Environment :: Console", + "Intended Audience :: Developers", + "License :: OSI Approved :: BSD License", + "Natural Language :: English", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Software Development :: Pre-processors", + "Topic :: Software Development :: Libraries :: Python Modules", +] + +requires-python = ">= 3.6" + +[project.urls] +Homepage = "http://sh13.net/projects/Lina" +"Issue Tracker" = "https://github.com/anteru/lina/issues" +Repository = "https://github.com/anteru/lina" + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.tox] +legacy_tox_ini = """[tox] +envlist=py{36,37,38,39,310,311,312} +skip_missing_interpreters=True + +[testenv] +deps= + pytest +commands= + py.test lina + +[testenv:cov] +deps= + pytest + pytest-cov + coverage +commands= + py.test --cov=lina lina + coverage html +""" + +[tool.hatch.version] +path = "lina/__init__.py" + +[tool.hatch.build.targets.wheel] +exclude = ["test"] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index b840582..0000000 --- a/setup.cfg +++ /dev/null @@ -1,5 +0,0 @@ -[metadata] -description-file = Readme.md - -[aliases] -test=pytest \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100644 index 55944b8..0000000 --- a/setup.py +++ /dev/null @@ -1,37 +0,0 @@ -from setuptools import setup, find_packages -import sys - -import lina - -setup( - name="Lina", - version=lina.__version__, - packages=find_packages (exclude=['*.test', 'test.*', '*.test.*']), - - python_requires='>=3.6', - - setup_requires=['pytest-runner'], - tests_require=['pytest'], - - author="Matthäus G. Chajdas", - author_email="dev@anteru.net", - description="Text template library", - long_description=open('README.md', 'r').read(), - long_description_content_type='text/markdown', - - license="BSD", - keywords=[], - url="http://shelter13.net/projects/Lina", - - classifiers=[ - 'Development Status :: 6 - Mature', - 'Environment :: Console', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: BSD License', - 'Natural Language :: English', - 'Operating System :: OS Independent', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', - 'Topic :: Software Development :: Pre-processors', - ] -) diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 12a8843..0000000 --- a/tox.ini +++ /dev/null @@ -1,18 +0,0 @@ -[tox] -envlist=py{36,37,38,39,310,311,312} -skip_missing_interpreters=True - -[testenv] -deps= - pytest -commands= - py.test lina - -[testenv:cov] -deps= - pytest - pytest-cov - coverage -commands= - py.test --cov=lina lina - coverage html