From 71c22b1c4624b11438b8b7bc6039b0e4aad4319f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis-Philippe=20V=C3=A9ronneau?= Date: Fri, 17 May 2024 17:44:56 -0400 Subject: [PATCH 1/3] Migrate to PEP517-compliant pyproject.toml build system MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Louis-Philippe Véronneau --- pyproject.toml | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ setup.py | 36 +++++++---------------------------- 2 files changed, 58 insertions(+), 29 deletions(-) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..e65c3256 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,51 @@ +[build-system] +requires = ["setuptools", "setuptools-scm"] +build-backend = "setuptools.build_meta" + +[project] +name = "whipper" +authors = [ + {name = "The Whipper Team"}, +] +description = "A CD-DA ripper prioritising accuracy over speed" +requires-python = ">=3.6" +readme = "README.md" +license = {file = "LICENSE"} +classifiers = [ + "Environment :: Console", + "Intended Audience :: End Users/Desktop", + "Topic :: Multimedia :: Sound/Audio", + "Programming Language :: Python :: 3", + "License :: OSI Approved :: GNU General Public License v3", +] +dependencies = [ + "musicbrainzngs", + "mutagen", + "pycdio", + "PyGObject", + "ruamel.yaml", + "setuptools_scm", + "discid", +] +dynamic = ["version"] + +[project.urls] +Home = "https://github.com/whipper-team/whipper" + +[project.optional-dependencies] +cover_art = ["pillow"] +docs = ["docutils"] + +[project.scripts] +whipper = "whipper.command.main:main" + +# This is necessary, since whipper uses a flat-layout, but has as a 'src' +# directory and setuptools gets confused otherwise. +[tool.setuptools.packages.find] +namespaces = false + +[tool.setuptools.package-data] +"whipper" = ["**"] + +[tool.setuptools_scm] +# Empty, but needed to enable SCM diff --git a/setup.py b/setup.py index d8f6db1d..f3f50fe1 100644 --- a/setup.py +++ b/setup.py @@ -1,33 +1,11 @@ -from setuptools import setup, find_packages, Extension +from setuptools import Extension, setup setup( - name="whipper", - use_scm_version=True, - description="a secure cd ripper preferring accuracy over speed", - author=['Thomas Vander Stichele', 'The Whipper Team'], - maintainer=['The Whipper Team'], - url='https://github.com/whipper-team/whipper', - license='GPL3', - python_requires='>=3.6', - packages=find_packages(), - setup_requires=['setuptools_scm'], ext_modules=[ - Extension('accuraterip', - libraries=['sndfile'], - sources=['src/accuraterip-checksum.c']) - ], - extras_require={ - 'cover_art': ["pillow"] - }, - entry_points={ - 'console_scripts': [ - 'whipper = whipper.command.main:main' - ] - }, - data_files=[ - ('share/metainfo', ['com.github.whipper_team.Whipper.metainfo.xml']), - ], - scripts=[ - 'scripts/accuraterip-checksum', - ], + Extension( + name="accuraterip", + libraries=['sndfile'], + sources=["src/accuraterip-checksum.c"], + ), + ] ) From 551819318732d50d4c96a6a627dbda62a92ffad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis-Philippe=20V=C3=A9ronneau?= Date: Fri, 17 May 2024 18:36:41 -0400 Subject: [PATCH 2/3] pyproject.toml: restrict what files are install, to not install __pycache__ artifacts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Louis-Philippe Véronneau --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e65c3256..3c328d9b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,7 @@ whipper = "whipper.command.main:main" namespaces = false [tool.setuptools.package-data] -"whipper" = ["**"] +"whipper" = ["test/*"] [tool.setuptools_scm] # Empty, but needed to enable SCM From 16eba83e0f601356dee30d4066d8856d0f5806b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis-Philippe=20V=C3=A9ronneau?= Date: Fri, 24 May 2024 17:04:14 -0400 Subject: [PATCH 3/3] Make sure all the test files are installed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Louis-Philippe Véronneau --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3c328d9b..9f23e468 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,7 @@ whipper = "whipper.command.main:main" namespaces = false [tool.setuptools.package-data] -"whipper" = ["test/*"] +"whipper" = ["test/**"] [tool.setuptools_scm] # Empty, but needed to enable SCM