diff --git a/.gitignore b/.gitignore index 13455a5..828fac8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,48 +1,16 @@ -*.py[cod] +*.pyc +__pycache__/ -# C extensions -*.so +.venv/ +venv/ -# Packages -*.egg* -*.egg-info -dist -build -eggs -parts -bin -var -sdist -develop-eggs -.installed.cfg -lib -lib64 - -# Installer logs -pip-log.txt - -# Unit test / coverage reports -cover/ -.coverage* -.tox -.venv -.pytest_cache/ -.mypy_cache/ - -# Translations -*.mo - -# Complexity -output/*.html -output/*/index.html - -# Editors -*~ -.*.swp -.*sw? - -# Sphinx +_version.py _build -# Other +build +dist +*.egg-info +.nox +.pytest_cache/ + _download diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 2e759eb..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,4 +0,0 @@ -graft zundler -global-exclude *.py[cod] -prune .* -exclude .* diff --git a/noxfile.py b/noxfile.py index a786e7c..0af45ca 100644 --- a/noxfile.py +++ b/noxfile.py @@ -10,5 +10,5 @@ def tests(session): @nox.session() def black(session): session.install(".[tests]") - session.run("black", "zundler", "--check", *session.posargs) + session.run("black", "src", "--check", *session.posargs) session.run("black", "tests", "--check", *session.posargs) diff --git a/pyproject.toml b/pyproject.toml index a6ffaf2..0c8e538 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] -requires = ["setuptools>=61.2"] -build-backend = "setuptools.build_meta" +requires = ["hatchling", "hatch-vcs"] +build-backend = "hatchling.build" [project] name = "zundler" @@ -32,19 +32,28 @@ dependencies = [ ] dynamic = ["version"] +[project.optional-dependencies] +tests = [ + 'pytest>=8', + 'selenium', + 'pytest-selenium', + 'pytest-docker', + 'black', + 'nox', +] + +[tool.hatch.version] +source = "vcs" + +[tool.hatch.build.hooks.vcs] +version-file = "_version.py" + [project.entry-points] "sphinx.builders" = {zundler = "zundler.sphinxext"} [project.scripts] zundler = "zundler.__main__:main" -[tool.setuptools] -zip-safe = false -include-package-data = true - -[tool.setuptools.packages] -find = {namespaces = false} - [tool.mypy] python_version = "3.8" show_column_numbers = true @@ -55,16 +64,6 @@ incremental = true check_untyped_defs = true warn_unused_ignores = true -[project.optional-dependencies] -tests = [ - 'pytest>=8', - 'selenium', - 'pytest-selenium', - 'pytest-docker', - 'black', - 'nox', -] - [tool.pytest.ini_options] minversion = "6.0" addopts = "-ra -q" diff --git a/zundler/__init__.py b/src/zundler/__init__.py similarity index 100% rename from zundler/__init__.py rename to src/zundler/__init__.py diff --git a/zundler/__main__.py b/src/zundler/__main__.py similarity index 100% rename from zundler/__main__.py rename to src/zundler/__main__.py diff --git a/zundler/args.py b/src/zundler/args.py similarity index 100% rename from zundler/args.py rename to src/zundler/args.py diff --git a/zundler/assets/LICENSE b/src/zundler/assets/LICENSE similarity index 100% rename from zundler/assets/LICENSE rename to src/zundler/assets/LICENSE diff --git a/zundler/assets/init.css b/src/zundler/assets/init.css similarity index 100% rename from zundler/assets/init.css rename to src/zundler/assets/init.css diff --git a/zundler/assets/init.html b/src/zundler/assets/init.html similarity index 100% rename from zundler/assets/init.html rename to src/zundler/assets/init.html diff --git a/zundler/assets/inject_post.js b/src/zundler/assets/inject_post.js similarity index 100% rename from zundler/assets/inject_post.js rename to src/zundler/assets/inject_post.js diff --git a/zundler/assets/inject_pre.js b/src/zundler/assets/inject_pre.js similarity index 100% rename from zundler/assets/inject_pre.js rename to src/zundler/assets/inject_pre.js diff --git a/zundler/assets/pako.min.js b/src/zundler/assets/pako.min.js similarity index 100% rename from zundler/assets/pako.min.js rename to src/zundler/assets/pako.min.js diff --git a/zundler/assets/zundler_bootstrap.js b/src/zundler/assets/zundler_bootstrap.js similarity index 100% rename from zundler/assets/zundler_bootstrap.js rename to src/zundler/assets/zundler_bootstrap.js diff --git a/zundler/assets/zundler_common.js b/src/zundler/assets/zundler_common.js similarity index 100% rename from zundler/assets/zundler_common.js rename to src/zundler/assets/zundler_common.js diff --git a/zundler/assets/zundler_main.js b/src/zundler/assets/zundler_main.js similarity index 100% rename from zundler/assets/zundler_main.js rename to src/zundler/assets/zundler_main.js diff --git a/zundler/embed.py b/src/zundler/embed.py similarity index 100% rename from zundler/embed.py rename to src/zundler/embed.py diff --git a/zundler/sphinxext/__init__.py b/src/zundler/sphinxext/__init__.py similarity index 100% rename from zundler/sphinxext/__init__.py rename to src/zundler/sphinxext/__init__.py