Skip to content

Commit

Permalink
Switch packaging to hatch (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
akx authored Nov 22, 2023
1 parent ad3cc01 commit 8dcae6d
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 51 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
branches: [master]

jobs:
build:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -34,3 +34,15 @@ jobs:
pytest --cov=./ --cov-report=xml -n auto
- name: Codecov
uses: codecov/[email protected]
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: pip install build
- name: Build package
run: python -m build
55 changes: 55 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "miditoolkit"
dynamic = ["version"]
description = "A python package for working with MIDI data files."
readme = "README.md"
license = "MIT"
requires-python = ">=3.7.0"
authors = [
{ name = "wayne391", email = "[email protected]" },
]
keywords = [
"midi",
"mir",
"music",
]
classifiers = [
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Multimedia :: Sound/Audio :: MIDI",
]
dependencies = [
"matplotlib",
"mido >= 1.1.16",
"numpy >= 1.19",
]

[project.optional-dependencies]
tests = [
"pytest-cov",
"pytest-xdist[psutil]",
"setuptools",
"tqdm",
]

[project.urls]
Homepage = "https://github.com/YatingMusic/miditoolkit"

[tool.hatch.version]
path = "miditoolkit/__init__.py"

[tool.hatch.build.targets.sdist]
include = [
"/miditoolkit",
]
50 changes: 0 additions & 50 deletions setup.py

This file was deleted.

0 comments on commit 8dcae6d

Please sign in to comment.