Skip to content

Commit

Permalink
Move from explicit includes/excludes list to packages, tweak some com…
Browse files Browse the repository at this point in the history
…mands
  • Loading branch information
timkpaine committed Nov 29, 2024
1 parent 32d9945 commit 5f2250e
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 92 deletions.
5 changes: 1 addition & 4 deletions js/Makefile.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ format: fix
################
# Other Checks #
################
.PHONY: check-manifest checks check annotate
.PHONY: check-manifest checks check

check-manifest: ## check python sdist manifest with check-manifest
check-manifest -v
Expand All @@ -65,9 +65,6 @@ checks: check-manifest
# alias
check: checks

annotate: ## run python type annotation checks with mypy
python -m mypy ./{{module}}

#########
# TESTS #
#########
Expand Down
28 changes: 2 additions & 26 deletions js/pyproject.toml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -102,34 +102,10 @@ artifacts = [
src = "/"

[tool.hatch.build.targets.sdist]
include = [
"/{{module}}",
"/js",
"LICENSE",
"README.md",
]
exclude = [
".copier-answers.yml",
"/.github",
"/.gitattributes",
"/.gitignore",
"/docs",
"/js/node_modules",
]
packages = ["{{module}}"]

[tool.hatch.build.targets.wheel]
include = [
"/{{module}}",
]
exclude = [
".copier-answers.yml",
"/.github",
"/.gitattributes",
"/.gitignore",
"/pyproject.toml",
"/docs",
"/js/node_modules",
]
packages = ["{{module}}"]

[tool.hatch.build.hooks.jupyter-builder]
build-function = "hatch_jupyter_builder.npm_builder"
Expand Down
5 changes: 1 addition & 4 deletions jupyter/Makefile.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ format: fix
################
# Other Checks #
################
.PHONY: check-manifest checks check annotate
.PHONY: check-manifest checks check

check-manifest: ## check python sdist manifest with check-manifest
check-manifest -v
Expand All @@ -65,9 +65,6 @@ checks: check-manifest
# alias
check: checks

annotate: ## run python type annotation checks with mypy
python -m mypy ./{{module}}

#########
# TESTS #
#########
Expand Down
28 changes: 2 additions & 26 deletions jupyter/pyproject.toml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -105,34 +105,10 @@ artifacts = [
src = "/"
[tool.hatch.build.targets.sdist]
include = [
"/{{module}}",
"/js",
"LICENSE",
"README.md",
]
exclude = [
".copier-answers.yml",
"/.github",
"/.gitattributes",
"/.gitignore",
"/js/node_modules",
"/docs",
]
packages = ["{{module}}"]
[tool.hatch.build.targets.wheel]
include = [
"/{{module}}",
]
exclude = [
".copier-answers.yml",
"/.github",
"/.gitattributes",
"/.gitignore",
"/pyproject.toml",
"/docs",
"/js/node_modules",
]
packages = ["{{module}}"]
[tool.hatch.build.targets.wheel.shared-data]
"{{module}}/labextension" = "share/jupyter/labextensions/{{module}}"
Expand Down
7 changes: 2 additions & 5 deletions python/Makefile.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ develop: ## install dependencies and build library
python -m pip install -e .[develop]

build: ## build the python library
python setup.py build build_ext --inplace
python -m build -n

install: ## install library
python -m pip install .
Expand All @@ -34,7 +34,7 @@ format: fix
################
# Other Checks #
################
.PHONY: check-manifest checks check annotate
.PHONY: check-manifest checks check

check-manifest: ## check python sdist manifest with check-manifest
check-manifest -v
Expand All @@ -44,9 +44,6 @@ checks: check-manifest
# Alias
check: checks

annotate: ## run python type annotation checks with mypy
python -m mypy ./{{module}}

#########
# TESTS #
#########
Expand Down
25 changes: 2 additions & 23 deletions python/pyproject.toml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -88,31 +88,10 @@ artifacts = []
src = "/"

[tool.hatch.build.targets.sdist]
include = [
"/{{module}}",
"LICENSE",
"README.md",
]
exclude = [
".copier-answers.yml",
"/.github",
"/.gitattributes",
"/.gitignore",
"/docs",
]
packages = ["{{module}}"]

[tool.hatch.build.targets.wheel]
include = [
"/{{module}}",
]
exclude = [
".copier-answers.yml",
"/.github",
"/.gitattributes",
"/.gitignore",
"/pyproject.toml",
"/docs",
]
packages = ["{{module}}"]

[tool.hatch.build.targets.wheel.shared-data]

Expand Down
5 changes: 1 addition & 4 deletions rust/Makefile.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ format: fix
################
# Other Checks #
################
.PHONY: check-manifest checks check annotate
.PHONY: check-manifest checks check

check-manifest: ## check python sdist manifest with check-manifest
check-manifest -v
Expand All @@ -75,9 +75,6 @@ checks: check-manifest
# alias
check: checks

annotate: ## run python type annotation checks with mypy
python -m mypy ./{{module}}

#########
# TESTS #
#########
Expand Down

0 comments on commit 5f2250e

Please sign in to comment.