Skip to content

Commit

Permalink
migrate to build module and remove setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
JostMigenda committed Dec 20, 2024
1 parent d29c43f commit cceb10f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 28 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install build twine
- name: Check and get Version Number
id: get_version
Expand All @@ -39,7 +39,7 @@ jobs:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_JM }}
run: |
python setup.py sdist bdist_wheel
python -m build
twine upload dist/*
- name: Create Draft Release
Expand Down
17 changes: 17 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[build-system]
requires = ["setuptools>=61"]
build-backend = "setuptools.build_meta"

[project]
name = "snewpy"
dynamic = ["version"]
Expand Down Expand Up @@ -32,3 +36,16 @@ docs = ["numpydoc"]

[tool.setuptools.dynamic]
version = {attr = "snewpy.__version__"}

[tool.setuptools.packages.find]
where = ["python"]
include = [
"snewpy",
"snewpy.*",
]
exclude = [
"snewpy.scripts",
]

[tool.setuptools.package-data]
"snewpy.models" = ["*.yml"]
26 changes: 0 additions & 26 deletions setup.py

This file was deleted.

0 comments on commit cceb10f

Please sign in to comment.