From 6b0048dfdaf2b3c9696fe87fbeca66c079280f67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Garc=C3=ADa=20Garz=C3=B3n?= Date: Tue, 10 Oct 2023 05:15:39 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8F=97=EF=B8=8F=20migrated=20to=20pyproje?= =?UTF-8?q?ct?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.md | 4 ++++ README.md | 2 +- pyproject.toml | 56 ++++++++++++++++++++++++++++++++++++++++++++++ setup.cfg | 9 -------- setup.py | 60 -------------------------------------------------- 5 files changed, 61 insertions(+), 70 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.cfg delete mode 100755 setup.py diff --git a/CHANGES.md b/CHANGES.md index 8def53a..03a1a3c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # Version history +## Unreleased + +- Migrated to pyproject.toml + ## 1.6.2 2023-10-10 - Temptative support for freebsd diff --git a/README.md b/README.md index c81b45a..f9043b1 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Features - Shortened constant names for formats (Using namespaces instead of prefixes) - Transparent UTF-8 handling for filenames and text strings - No module compilation required (wraps the dll using ctypes) -- Compatible with Python >= 2.6 including Python3 +- Compatible with Python >= 3.8 You can find the latest version at: https://github.com/vokimon/python-wavefile diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..0ffc883 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,56 @@ +[build-system] +requires = ["setuptools", "wheel"] + + +[project] +name = "wavefile" +version = "1.6.2" +description = "Pythonic wave file reader and writer" +authors = [ + { name="David García Garzón", email="voki@canvoki.net" }, +] +readme = "README.md" +requires-python = ">=3.8" +license = { file="LICENSE"} +keywords = ["audio", "wavefile", "libsndfile"] + +classifiers = [ + 'Programming Language :: Python', + 'Programming Language :: Python :: 3', + 'Topic :: Multimedia', + 'Topic :: Scientific/Engineering', + 'Topic :: Software Development :: Libraries :: Python Modules', + 'Intended Audience :: Developers', + 'Intended Audience :: Science/Research', + 'Development Status :: 5 - Production/Stable', + 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', + 'Operating System :: OS Independent', +] +dependencies = [ + 'numpy', +] + +[project.optional-dependencies] +test = [ + 'pytest', + 'pytest-cov', +] +examples = [ + 'PyAudio', +] + +[project.urls] +Homepage = "https://github.com/vokimon/python-wavefile" +Documentation = "https://readthedocs.org" +Repository = "https://github.com/vokimon/python-wavefile" +Changelog = "https://github.com/vokimon/python-wavefile/blob/master/CHANGELOG.md" + +[tool.coverage.run] +relative_files = true +branch = true +omit = ["**/*test.py"] + +[tool.pytest.ini_options] +addopts = "--cov=wavefile" + + diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index a5e2db0..0000000 --- a/setup.cfg +++ /dev/null @@ -1,9 +0,0 @@ -[coverage:run] -relative_files = True -branch=True -omit = - **/*test.py - -[tool:pytest] -addopts: --cov=wavefile - diff --git a/setup.py b/setup.py deleted file mode 100755 index a544d3a..0000000 --- a/setup.py +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/env python -from setuptools import setup, find_packages -import sys - -readme = """ -Pythonic libsndfile wrapper to read and write audio files. - -Features --------- - -- Writer and reader objects are context managers -- Format, channels, length, sample rate... are accessed as properties as well as text strings -- Real multichannel (not just mono/stereo) -- All libsndfile formats supported, floating point encodings by default -- Numpy based interface -- Generators for block by block reading -- Reading reuses the same data block to avoid many data allocations -- Shortened constant names for formats (Using scopes instead of prefixes) -- Matlab-like whole-file interface (not recommended in production code but quite convenient for quick scripting) -- Transparent UTF-8 handling for filenames and text strings -- No module compilation required (wraps the dll using ctypes) -- Works both for Python3 >= 3.8 - -You can find the latest version at: -https://github.com/vokimon/python-wavefile -""" - -setup( - name = "wavefile", - version = '1.6.2', - description = "Pythonic wave file reader and writer", - author = "David Garcia Garzon", - author_email = "voki@canvoki.net", - url = 'https://github.com/vokimon/python-wavefile', - long_description = readme, - long_description_content_type = 'text/markdown', - license = 'GNU General Public License v3 or later (GPLv3+)', - packages=find_packages(exclude=['*_test']), - install_requires=[ - 'numpy', - ], - test_suite='test', - tests_require='PyAudio', - extras_require={ - "examples": "PyAudio" - }, - classifiers = [ - 'Programming Language :: Python', - 'Programming Language :: Python :: 3', - 'Topic :: Multimedia', - 'Topic :: Scientific/Engineering', - 'Topic :: Software Development :: Libraries :: Python Modules', - 'Intended Audience :: Developers', - 'Intended Audience :: Science/Research', - 'Development Status :: 5 - Production/Stable', - 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', - 'Operating System :: OS Independent', - ], -) -