From 328652d59e043ff52bd0c0fe6a5b0b4ce8202bbf Mon Sep 17 00:00:00 2001 From: Onuralp SEZER Date: Sun, 22 Sep 2024 01:07:15 +0300 Subject: [PATCH 1/3] feat: replace hatchling to setuptools can be packaged easily at distros Signed-off-by: Onuralp SEZER --- .gitignore | 3 +++ pyproject.toml | 37 ++++++++++++++++++++++++++++++------- 2 files changed, 33 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index cae3d28..a773c80 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ dist venv __pycache__ +.venv +env +*.egg-info diff --git a/pyproject.toml b/pyproject.toml index 82b666c..d018251 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,20 +1,43 @@ [build-system] -requires = [ - 'hatchling', -] -build-backend = 'hatchling.build' +requires = ["setuptools", "setuptools-scm", "wheel"] +build-backend = "setuptools.build_meta" [project] name = 'pyacl' description = 'High level abstractions over pylibacl' version = '0.0.1' +readme = "README.md" authors = [ { name='Georg Pfuetzenreuter', email='georg+python@lysergic.dev' }, ] -readme = 'README.md' +classifiers = [ + "Development Status :: 3 - Alpha", + "Intended Audience :: Developers", + "Intended Audience :: Education", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: European Union Public Licence 1.2 (EUPL 1.2)", + "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", + "Typing :: Typed", + "Operating System :: POSIX :: Linux", +] requires-python = '>=3.6' -[tool.hatch.build.targets.pyacl] dependencies = [ - 'pylibacl', + 'pylibacl==0.5.4', ] + +[tool.setuptools] +include-package-data = true # include non-python files in the package (default) + +[tool.setuptools.packages.find] +where = ["."] +exclude = ["scripts", "scripts.*", "docs.*", "tests", "tests.*", "ruff.toml"] + From c6496c68f9cb3a9b3fea4ab054fb8d594afee852 Mon Sep 17 00:00:00 2001 From: Onuralp SEZER Date: Sun, 22 Sep 2024 01:18:44 +0300 Subject: [PATCH 2/3] feat: dev deps added into pyproject.toml Signed-off-by: Onuralp SEZER --- pyproject.toml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index d018251..e498cee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,6 +34,13 @@ dependencies = [ 'pylibacl==0.5.4', ] +[project.optional-dependencies] +dev = [ + "pytest", + "ruff", + "PyYAML" +] + [tool.setuptools] include-package-data = true # include non-python files in the package (default) From d22b17652139d118f8abdd10ca9e77fd65b48577 Mon Sep 17 00:00:00 2001 From: Onuralp SEZER Date: Sun, 22 Sep 2024 01:25:46 +0300 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20=E2=9C=A8=20introduce=20=5F=5Fversi?= =?UTF-8?q?on=5F=5F=20has=20been=20added?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Onuralp SEZER --- pyacl/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pyacl/__init__.py b/pyacl/__init__.py index ecaef5e..02a1682 100644 --- a/pyacl/__init__.py +++ b/pyacl/__init__.py @@ -7,3 +7,11 @@ You may not use this work except in compliance with the Licence. An English copy of the Licence is shipped in a file called LICENSE along with this applications source code. You may obtain copies of the Licence in any of the official languages at https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12. """ + +import importlib.metadata as importlib_metadata + +try: + # This will read version from pyproject.toml + __version__ = importlib_metadata.version(__package__ or __name__) +except importlib_metadata.PackageNotFoundError: + __version__ = "development"