From 309b37745b1345b3c6fb20eaef6724fadd23c629 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Fri, 9 Dec 2022 20:50:19 -0700 Subject: [PATCH] Migrate to hatch --- .flake8 | 2 ++ .gitignore | 1 + pyproject.toml | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++ setup.cfg | 37 ----------------------------- setup.py | 6 ----- 5 files changed, 67 insertions(+), 43 deletions(-) create mode 100644 .flake8 create mode 100644 pyproject.toml delete mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..6deafc2 --- /dev/null +++ b/.flake8 @@ -0,0 +1,2 @@ +[flake8] +max-line-length = 120 diff --git a/.gitignore b/.gitignore index a4ac41e..816211e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ __pycache__ *.py[co] *.sqlite data/ +dist/ diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..4d13633 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,64 @@ +[build-system] +requires = ["hatchling", "hatch-vcs"] +build-backend = "hatchling.build" + +[project] +name = "StatusForce" +description = "Simple status page for system status" +readme = "README.rst" +license = "MIT" +requires-python = ">=3.10" +authors = [ + { name = "Raoul Snyman", email = "raoul@libertytechforce.com" }, +] +keywords = [ + "status", + "website", +] +classifiers = [ + "Development Status :: 3 - Alpha", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Operating System :: POSIX", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Topic :: Utilities", +] +dependencies = [ + "Flask", + "Flask-Admin", + "Flask-Login", + "Flask-SQLAlchemy", + "psycopg2-binary", + "pymysql", + "greenlet<0.5,>=0.4.5" +] +dynamic = ["version"] + +[project.urls] +Homepage = "https://libertytechforce.com" +Issues = "https://git.libertytechforce.com/libertytechforce/statusforce/issues" +Source = "https://git.libertytechforce.com/libertytechforce/statusforce" + +[project.optional-dependencies] +tests = [ + "pytest", + "pytest-faker", + "pytest-flask" +] + +[tool.hatch.version] +source = "vcs" + +[tool.hatch.build.targets.sdist] +include = [ + "/statusforce", +] + +[tool.hatch.build.targets.wheel] +include = [ + "statusforce", +] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 226a0ac..0000000 --- a/setup.cfg +++ /dev/null @@ -1,37 +0,0 @@ -[metadata] -name = StatusForce -version = 0.0.1 -author = Raoul Snyman -author_email = raoul@libertytechforce.com -description = Simple status page for system status -long_description = file:README.rst -long_description_content_type = text/x-rst -url = https://libertytechforce.com -license = MIT -classifiers = - Development Status :: 3 - Alpha - Intended Audience :: Developers - License :: OSI Approved :: MIT License - Operating System :: POSIX - Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Topic :: Utilities -keywords = website, status - -[options] -py_modules = statusforce -python_requires = >=3.7 -install_requires = - Flask - Flask-Admin - Flask-SQLAlchemy - Flask-Login - -[bdist_wheel] -universal = 1 - -[flake8] -max-line-length = 120 diff --git a/setup.py b/setup.py deleted file mode 100644 index 567d8b7..0000000 --- a/setup.py +++ /dev/null @@ -1,6 +0,0 @@ -""" -The statusforce package -""" -from setuptools import setup - -setup() -- 2.40.1