From 5b3701b66765d81aa670a6b08cf4e15ef988fcfa Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Fri, 12 Aug 2022 13:47:42 -0700 Subject: [PATCH 1/6] Try switching to flit Replacing setup.py with pyproject.toml. --- MANIFEST.in | 8 -------- pyproject.toml | 26 ++++++++++++++++++++++++++ setup.py | 50 -------------------------------------------------- 3 files changed, 26 insertions(+), 58 deletions(-) delete mode 100644 MANIFEST.in create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 6f2aedc..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,8 +0,0 @@ -# Documentation. -include README.rst -# Example script. -include decode.py -# License -include LICENSE -# Include full test suite -recursive-include test/ * diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..8cc6695 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,26 @@ +[build-system] +requires = ["flit_core >=2,<4"] +build-backend = "flit_core.buildapi" + +[tool.flit.metadata] +module = "audioread" +author = "Adrian Sampson" +author-email = "adrian@radbox.org" +home-page = "https://github.com/beetbox/audioread" +description-file = "README.rst" +requires-python = ">=3.6" +classifiers = [ + 'Topic :: Multimedia :: Sound/Audio :: Conversion', + 'Intended Audience :: Developers', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', +] + +[tool.flit.metadata.requires-extra] +test = [ + "tox" +] diff --git a/setup.py b/setup.py deleted file mode 100644 index 6941028..0000000 --- a/setup.py +++ /dev/null @@ -1,50 +0,0 @@ -# This file is part of audioread. -# Copyright 2013, Adrian Sampson. -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. - -import os -from setuptools import setup -import imp - -version = imp.load_source('audioread.version', 'audioread/version.py') - - -def _read(fn): - path = os.path.join(os.path.dirname(__file__), fn) - return open(path).read() - - -setup(name='audioread', - version=version.version, - description='multi-library, cross-platform audio decoding', - author='Adrian Sampson', - author_email='adrian@radbox.org', - url='https://github.com/sampsyo/audioread', - license='MIT', - platforms='ALL', - long_description=_read('README.rst'), - - packages=['audioread'], - - classifiers=[ - 'Topic :: Multimedia :: Sound/Audio :: Conversion', - 'Intended Audience :: Developers', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - ], - python_requires='>=3.6', -) From 25d7b47298a2961e79c76b20279314b84c271ce3 Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Fri, 12 Aug 2022 13:48:12 -0700 Subject: [PATCH 2/6] Ignore build directory --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..849ddff --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +dist/ From 24599cdea21748964f1e7b16fede469f5255e8d7 Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Fri, 12 Aug 2022 13:49:40 -0700 Subject: [PATCH 3/6] Version bump --- audioread/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audioread/version.py b/audioread/version.py index 83e990e..83436d0 100644 --- a/audioread/version.py +++ b/audioread/version.py @@ -14,5 +14,5 @@ """Version data for the audioread package.""" -version = '3.0.0' +version = '3.0.1' short_version = '3.0' From 607500864803e4d49b8fad08bb27a0290472f402 Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Fri, 12 Aug 2022 13:52:01 -0700 Subject: [PATCH 4/6] Better short description --- audioread/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audioread/__init__.py b/audioread/__init__.py index d7f413b..f51e361 100644 --- a/audioread/__init__.py +++ b/audioread/__init__.py @@ -12,7 +12,7 @@ # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. -"""Decode audio files.""" +"""Multi-library, cross-platform audio decoding.""" from . import ffdec from .exceptions import DecodeError, NoBackendError From 324b6cf33a54ec810c022482bf79a96ab33d706c Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Fri, 12 Aug 2022 13:53:16 -0700 Subject: [PATCH 5/6] Set `isolated_build` in tox config --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index c94c5be..923c342 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,6 @@ [tox] envlist = py36,py37,py38,py39,py310 +isolated_build = True [testenv] deps = pytest From ab64be8cb12e0c4cd8b81038a0435e41e9635d18 Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Fri, 12 Aug 2022 13:59:00 -0700 Subject: [PATCH 6/6] Migrate to new-style (PEP 621) metadata --- pyproject.toml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 8cc6695..23aafaf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,14 +1,16 @@ [build-system] -requires = ["flit_core >=2,<4"] +requires = ["flit_core >=3.2,<4"] build-backend = "flit_core.buildapi" -[tool.flit.metadata] -module = "audioread" -author = "Adrian Sampson" -author-email = "adrian@radbox.org" -home-page = "https://github.com/beetbox/audioread" -description-file = "README.rst" +[project] +name = "audioread" +authors = [ + {name = "Adrian Sampson", email = "adrian@radbox.org"} +] +readme = "README.rst" requires-python = ">=3.6" +dynamic = ["version", "description"] +urls.Home = "https://github.com/beetbox/audioread" classifiers = [ 'Topic :: Multimedia :: Sound/Audio :: Conversion', 'Intended Audience :: Developers', @@ -20,7 +22,7 @@ classifiers = [ 'Programming Language :: Python :: 3.10', ] -[tool.flit.metadata.requires-extra] +[project.optional-dependencies] test = [ "tox" ]