From f2755e982368f018eaefad3a82dda332f27249c3 Mon Sep 17 00:00:00 2001 From: grym Date: Tue, 22 Nov 2022 22:08:28 -0500 Subject: [PATCH] Show single-file package example --- .pre-commit-config.yaml | 2 +- pyproject.toml | 6 ++---- template/cli.py => template.py | 0 template/__init__.py | 0 4 files changed, 3 insertions(+), 5 deletions(-) rename template/cli.py => template.py (100%) delete mode 100644 template/__init__.py diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5c974de..f6dc1dc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,7 +13,7 @@ repos: - id: check-added-large-files args: [--maxkb=5120] # 2 MB - repo: https://github.com/psf/black - rev: 21.12b0 + rev: 22.10.0 hooks: - id: black name: Formatting diff --git a/pyproject.toml b/pyproject.toml index 8fe31fe..efb9595 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] requires = ["setuptools>=65.0.0", "wheel"] -# requires = ["setuptools", "wheel", "versioningit~=1.0.0"] +# requires = ["setuptools>=65.0.0", "wheel", "versioningit~=2.1.0"] build-backend = "setuptools.build_meta" # [tool.versioningit] @@ -14,8 +14,6 @@ build-backend = "setuptools.build_meta" # [tool.versioningit.write] # file = "template/_version.py" -[tool.setuptools.packages] -find = {namespaces = false} [project] name = "template" description = "A Template!" @@ -28,4 +26,4 @@ dynamic = ["version"] dev = ["pre-commit","pytest"] [project.scripts] -template = "template.cli:main" +template = "template:main" diff --git a/template/cli.py b/template.py similarity index 100% rename from template/cli.py rename to template.py diff --git a/template/__init__.py b/template/__init__.py deleted file mode 100644 index e69de29..0000000