Skip to content

A lightweight yet powerful audio-to-MIDI converter with pitch bend detection

Move from setup.cfg to pyproject.toml

David Rubinstein30c1df8f612f
diff --git a/basic_pitch/__init__.py b/basic_pitch/__init__.py
index cc86867..d3b38b4 100644
--- a/basic_pitch/__init__.py
+++ b/basic_pitch/__init__.py
@@ -19,14 +19,6 @@ import enum
import logging
import pathlib
-__author__ = "Spotify"
-__version__ = "0.3.0"
-__email__ = "[email protected]"
-__demowebsite__ = "https://basicpitch.io"
-__description__ = "Basic Pitch, a lightweight yet powerful audio-to-MIDI converter with pitch bend detection."
-__url__ = "https://github.com/spotify/basic-pitch"
-
-
try:
import tensorflow
diff --git a/pyproject.toml b/pyproject.toml
index aa8effa..1bf672d 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -17,15 +17,18 @@ classifiers = [
"Programming Language :: Python :: Implementation :: CPython",
]
dependencies = [
+ "coremltools; platform_system == 'Darwin' and python_version < '3.11'",
"librosa>=0.8.0",
"mir_eval>=0.6",
"numpy>=1.18",
+ "onnxruntime; platform_system == 'Windows' and python_version < '3.11'",
"pretty_midi>=0.2.9",
"resampy>=0.2.2",
"scipy>=1.4.1",
+ "tflite-runtime; platform_system == 'Linux' and python_version < '3.11'",
"typing_extensions",
- "tensorflow>=2.4.1; platform_system != 'Darwin'",
- "tensorflow-macos>=2.4.1; platform_system == 'Darwin'",
+ "tensorflow>=2.4.1; platform_system != 'Darwin' and python_version >= '3.11'",
+ "tensorflow-macos>=2.4.1; platform_system == 'Darwin' and python_version >= '3.11'",
]
[metadata]
@@ -51,9 +54,15 @@ test = [
"pytest>=6.1.1",
"pytest-mock",
]
+tf = [
+ "tensorflow>=2.4.1; platform_system != 'Darwin'",
+ "tensorflow-macos>=2.4.1; platform_system == 'Darwin' and python_version > '3.7'",
+]
+coreml = ["coremltools"]
+onnx = ["onnxruntime"]
docs = ["mkdocs>=1.0.4"]
dev = [
- "basic_pitch[test,docs]",
+ "basic_pitch[test,tf,coreml,onnx,docs]",
"mypy",
"tox",
]
@@ -63,6 +72,7 @@ universal = true
[build-system]
requires = [
- "setuptools",
+ "setuptools>=40.8.0",
"wheel",
-]
\ No newline at end of file
+ "cython",
+]
diff --git a/setup.cfg b/setup.cfg
deleted file mode 100644
index 585a694..0000000
--- a/setup.cfg
+++ /dev/null
@@ -1,81 +0,0 @@
-[bumpversion]
-current_version = 0.3.0
-commit = True
-tag = True
-
-[metadata]
-name = basic-pitch
-version = attr: basic_pitch.__version__
-description = Basic Pitch, a lightweight yet powerful audio-to-MIDI converter with pitch bend detection.
-long_description = Basic Pitch, a lightweight yet powerful audio-to-MIDI converter with pitch bend detection. See https://github.com/spotify/basic-pitch for more details.
-author = Spotify
-author_email = [email protected]
-maintainer = Spotify
-maintainer_email = [email protected]
-url = https://github.com/spotify/basic-pitch
-keywords =
-license = Apache 2.0
-classifiers =
- Development Status :: 5 - Production/Stable
- Natural Language :: English
- Operating System :: POSIX :: Linux
- Operating System :: MacOS :: MacOS X
- Operating System :: Microsoft :: Windows
- Programming Language :: Python
- Programming Language :: Python :: 3.7
- Programming Language :: Python :: 3.8
- Programming Language :: Python :: 3.9
- Programming Language :: Python :: 3.10
- Programming Language :: Python :: Implementation :: CPython
-
-[options]
-zip_safe = False
-packages = find:
-include_package_data = True
-install_requires =
- coremltools; platform_system == "Darwin" and python_version < "3.11"
- librosa>=0.8.0
- mir_eval>=0.6
- numpy<1.24,>=1.18
- onnxruntime; platform_system == "Windows" and python_version < "3.11"
- pretty_midi>=0.2.9
- resampy>=0.2.2
- scipy>=1.4.1
- tflite-runtime; platform_system == "Linux" and python_version < "3.11"
- typing_extensions
- tensorflow>=2.4.1; platform_system != "Darwin" and python_version >= "3.11"
- tensorflow-macos>=2.4.1; platform_system == "Darwin" and "3.7" > python_version >= "3.11"
-
-[options.entry_points]
-console_scripts =
- basic-pitch = basic_pitch.predict:main
-
-[options.extras_require]
-test =
- coverage>=5.0.2
- pytest>=6.1.1
- pytest-mock
-tf =
- tensorflow>=2.4.1; platform_system != "Darwin"
- tensorflow-macos>=2.4.1; platform_system == "Darwin" and python_version > "3.7"
-coreml =
- coremltools
-onnx =
- onnxruntime
-docs =
- mkdocs>=1.0.4
-dev =
- basic_pitch[test,tf,coreml,onnx,docs]
- bump2version>=1.0.1
- mypy
- tox
-
-[bumpversion:file:basic_pitch/__init__.py]
-
-[bdist_wheel]
-universal = 1
-
-[build-system]
-requires =
- wheel
- cython