Skip to content

Commit d17387d

Browse files
mwtoewsJamesParrott
authored andcommitted
Change to hatchling build backend, and move to src layout
1 parent 6e1a2a0 commit d17387d

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

.github/workflows/run_checks_build_and_test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
run: |
2626
python -m pip install --upgrade pip
2727
pip install pytest pylint pylint-per-file-ignores
28+
pip install -e .
2829
- name: run Pylint for errors and warnings only, on test_shapefile.py
2930
run: |
3031
pylint --disable=R,C test_shapefile.py

MANIFEST.in

Lines changed: 0 additions & 2 deletions
This file was deleted.

pyproject.toml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[build-system]
2-
requires = ["setuptools"]
3-
build-backend = "setuptools.build_meta"
2+
requires = ["hatchling"]
3+
build-backend = "hatchling.build"
44

55
[project]
66
name = "pyshp"
@@ -33,8 +33,15 @@ test = ["pytest"]
3333
[project.urls]
3434
Repository = "https://github.com/GeospatialPython/pyshp"
3535

36-
[tool.setuptools.dynamic]
37-
version = {attr = "shapefile.__version__"}
36+
[tool.hatch.build.targets.sdist]
37+
only-include = ["src", "shapefiles", "test_shapefile.py"]
38+
39+
[tool.hatch.build.targets.wheel]
40+
only-include = ["src"]
41+
sources = {"src" = ""} # move from "src" directory for wheel
42+
43+
[tool.hatch.version]
44+
path = "src/shapefile.py"
3845

3946
[tool.ruff]
4047
# Exclude a variety of commonly ignored directories.
File renamed without changes.

0 commit comments

Comments
 (0)