From ef8cca3d23367748228640eb6bb1a5445ea0edd0 Mon Sep 17 00:00:00 2001 From: Syed Muhammad Dawoud Sheraz Ali Date: Wed, 12 Mar 2025 11:50:50 +0500 Subject: [PATCH] build: Add hatch_build in sdist to fix installation issues --- .../20250312_114455_dawoud.sheraz_fix_hatch_build.md | 1 + pyproject.toml | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 changelog.d/20250312_114455_dawoud.sheraz_fix_hatch_build.md diff --git a/changelog.d/20250312_114455_dawoud.sheraz_fix_hatch_build.md b/changelog.d/20250312_114455_dawoud.sheraz_fix_hatch_build.md new file mode 100644 index 0000000..fb4c929 --- /dev/null +++ b/changelog.d/20250312_114455_dawoud.sheraz_fix_hatch_build.md @@ -0,0 +1 @@ +- [Improvement] Add hatch_build.py in sdist target to fix the installation issues (by @dawoudsheraz) diff --git a/pyproject.toml b/pyproject.toml index cc01f3c..f029f70 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,13 @@ classifiers = [ dependencies = [ "tutor>=19.0.0,<20.0.0", ] -optional-dependencies = { dev = ["tutor[dev]>=19.0.0,<20.0.0"] } + +[project.optional-dependencies] +dev = [ + "tutor[dev]>=19.0.0,<20.0.0", + "black", + "pylint" +] # These fields will be set by hatch_build.py dynamic = ["version"] @@ -57,7 +63,8 @@ packages = ["tutornotes"] [tool.hatch.build.targets.sdist] # Disable strict naming, otherwise twine is not able to detect name/version strict-naming = false -include = [ "/tutornotes"] +include = [ "/tutornotes", ".hatch_build.py"] +exclude = ["tests*"] [project.entry-points."tutor.plugin.v1"] notes = "tutornotes.plugin"