From 3186499cc8a23ec489c1f93e41408d10b1b741a4 Mon Sep 17 00:00:00 2001 From: Kushal Das Date: Thu, 27 Jun 2024 11:12:45 +0200 Subject: [PATCH] Uses flit for building the project --- scripts/knotctl => knotctl/__init__.py | 0 pyproject.toml | 37 ++++++++++++++++++++++++++ requirements.txt | 2 +- setup.py | 26 ------------------ 4 files changed, 38 insertions(+), 27 deletions(-) rename scripts/knotctl => knotctl/__init__.py (100%) create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/scripts/knotctl b/knotctl/__init__.py similarity index 100% rename from scripts/knotctl rename to knotctl/__init__.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..c6d3de5 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,37 @@ +[build-system] +requires = ["flit_core >=3.2,<4"] +build-backend = "flit_core.buildapi" + +[project] +name="knotctl" +description="A CLI for knotapi." +authors = [ + {name = "Micke Nordin", email = "hej@mic.ke"}, +] +license= { file="LICENSE" } +readme= "README.md" +classifiers=[ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", + "Operating System :: OS Independent", + ] +requires-python= ">=3.9" +version = "0.0.7" + +dependencies = [ + "argcomplete==2.0.0", + "pyyaml==5.4.1", + "requests==2.27.1", + "simplejson==3.17.6", +] + +[project.urls] +Source="https://code.smolnet.org/micke/knotctl" +Documentation = "https://code.smolnet.org/micke/knotctl" + +[project.scripts] +knotctl="knotctl:main" + + +[tool.flit.sdist] +include = ["LICENSE",] diff --git a/requirements.txt b/requirements.txt index a6e68ca..246f2bc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ argcomplete==2.0.0 -pyyaml==5.4.1 +pyyaml==6.0.1 requests==2.27.1 simplejson==3.17.6 diff --git a/setup.py b/setup.py deleted file mode 100644 index e5968ba..0000000 --- a/setup.py +++ /dev/null @@ -1,26 +0,0 @@ -import setuptools - -with open("README.md", "r", encoding="utf-8") as fh: - long_description = fh.read() - -setuptools.setup( - name="knotctl", - version="0.0.7", - packages=setuptools.find_packages(), - author="Micke Nordin", - author_email="hej@mic.ke", - description="A cli for knotapi.", - long_description=long_description, - long_description_content_type="text/markdown", - url="https://code.smolnet.org/micke/knotctl", - project_urls={ - "Bug Tracker": "https://code.smolnet.org/micke/knotctl/issues", - }, - classifiers=[ - "Programming Language :: Python :: 3", - "License :: OSI Approved :: GPL-3.0", - "Operating System :: OS Independent", - ], - python_requires=">=3.9", - scripts=["scripts/knotctl"], -)