Switch from setup.py to pyproject.toml

This commit is contained in:
Sleepy Monax 2023-08-18 22:27:12 +02:00 committed by VAN BOSSUYT Nicolas
parent 92a6893732
commit 6dd4a49043
4 changed files with 28 additions and 34 deletions

View file

@ -1,7 +1,7 @@
import os import os
import sys import sys
VERSION = (0, 5, 1, "") VERSION = (0, 6, 0, "dev")
VERSION_STR = f"{VERSION[0]}.{VERSION[1]}.{VERSION[2]}{'-' + VERSION[3] if VERSION[3] else ''}" VERSION_STR = f"{VERSION[0]}.{VERSION[1]}.{VERSION[2]}{'-' + VERSION[3] if VERSION[3] else ''}"
MODULE_DIR = os.path.dirname(os.path.realpath(__file__)) MODULE_DIR = os.path.dirname(os.path.realpath(__file__))
ARGV0 = os.path.basename(sys.argv[0]) ARGV0 = os.path.basename(sys.argv[0])
@ -16,4 +16,5 @@ TARGETS_DIR = os.path.join(META_DIR, "targets")
DEFAULT_REPO_TEMPLATES = "cute-engineering/cutekit-templates" DEFAULT_REPO_TEMPLATES = "cute-engineering/cutekit-templates"
DESCRIPTION = "A build system and package manager for low-level software development" DESCRIPTION = "A build system and package manager for low-level software development"
PROJECT_LOG_FILE = os.path.join(PROJECT_CK_DIR, "cutekit.log") PROJECT_LOG_FILE = os.path.join(PROJECT_CK_DIR, "cutekit.log")
GLOBAL_LOG_FILE = os.path.join(os.path.expanduser("~"), ".cutekit", "cutekit.log") GLOBAL_LOG_FILE = os.path.join(
os.path.expanduser("~"), ".cutekit", "cutekit.log")

25
pyproject.toml Normal file
View file

@ -0,0 +1,25 @@
[build-system]
requires = ["setuptools ~= 68.0"]
[project]
name = "cutekit"
description = "A build system and package manager for low-level software development"
authors = [
{ name = "Keyboard Slayer", email = "joda@cute.engineering" },
{ name = "Sleepy Monax", email = "nivb@cute.engineering" },
{ name = "Cyp", email = "cypb@cute.engineering" },
{ name = "Cute Engineering", email = "contact@cute.engineering" },
]
readme = "README.md"
requires-python = ">=3.10"
license = { text = "MIT" }
dependencies = ["requests ~= 2.28.0", "graphviz ~= 0.20.1"]
dynamic = ["version"]
[tool.setuptools.dynamic]
version = { attr = "cutekit.const.VERSION" }
[project.scripts]
ck = "cutekit:main"
cutekit = "cutekit:main"
cute-engineering-cutekit = "cutekit:main"

View file

@ -1,4 +0,0 @@
[metadata]
description-file=README.md
license_file=LICENSE

View file

@ -1,28 +0,0 @@
from setuptools import setup
from cutekit.const import VERSION_STR, DESCRIPTION
setup(
name="cutekit",
version=VERSION_STR,
python_requires='>=3.10',
description=DESCRIPTION,
author="Cute Engineering",
author_email="contact@cute.engineering",
url="https://cute.engineering/",
packages=["cutekit"],
install_requires=[
"requests",
"graphviz"
],
entry_points={
"console_scripts": [
"ck = cutekit:main",
"cutekit = cutekit:main",
"cute-engineering-cutekit = cutekit:main",
],
},
license="MIT",
platforms="any",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
)