From f1d8e60f9c8061be45d57b9c1a21eed6dfab7f44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian-Robert=20St=C3=B6ter?= Date: Tue, 16 Apr 2024 11:42:33 +0200 Subject: [PATCH] remove setup.py --- .github/workflows/test_black.yml | 2 +- .github/workflows/test_cli.yml | 4 +- hubconf.py | 2 +- pyproject.toml | 64 +++++++++++++++++++++++++++----- setup.py | 45 ---------------------- 5 files changed, 58 insertions(+), 59 deletions(-) delete mode 100644 setup.py diff --git a/.github/workflows/test_black.yml b/.github/workflows/test_black.yml index 51d53364..52629122 100644 --- a/.github/workflows/test_black.yml +++ b/.github/workflows/test_black.yml @@ -1,5 +1,5 @@ name: Lint -on: [push, pull_request] # yamllint disable-line rule:truthy +on: [pull_request] # yamllint disable-line rule:truthy jobs: lint: runs-on: ubuntu-latest diff --git a/.github/workflows/test_cli.yml b/.github/workflows/test_cli.yml index e9623e42..a3299330 100644 --- a/.github/workflows/test_cli.yml +++ b/.github/workflows/test_cli.yml @@ -12,10 +12,10 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.9, 3.10] + python-version: [3.9] # Timeout: https://stackoverflow.com/a/59076067/4521646 - timeout-minutes: 10 + timeout-minutes: 20 steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} diff --git a/hubconf.py b/hubconf.py index 669017fd..ebc14745 100644 --- a/hubconf.py +++ b/hubconf.py @@ -4,7 +4,7 @@ # `xxx` take waveform inputs and output separated waveforms # Optional list of dependencies required by the package -dependencies = ['torch', 'numpy'] +dependencies = ["torch", "numpy"] from openunmix import umxse_spec from openunmix import umxse diff --git a/pyproject.toml b/pyproject.toml index 8f5c2c67..4f494b35 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,20 +1,59 @@ +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + [project] -name = "separate_torch" +name = "openunmix" authors = [ {name = "Fabian-Robert Stöter", email = "mail@faroit.com"}, {name = "Antoine Liutkus", email = "antoine.liutkus@inria.fr"}, ] -description = "Reference implementation for music separation" -version = "1.2.1" -dynamic = ["readme"] +version = "1.3.0" +description = "PyTorch-based music source separation toolkit" +readme = "README.md" +license = { text = "MIT" } +requires-python = ">=3.9" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: Software Development :: Quality Assurance", +] +dependencies = [ + "numpy", + "torchaudio>=0.9.0", + "torch>=1.9.0", + "tqdm", +] +[project.optional-dependencies] +asteroid = ["asteroid-filterbanks>=0.3.2"] +stempeg = ["stempeg"] +evaluation = ["musdb>=0.4.0", "museval>=0.4.0"] +tests = [ + "pytest", + "musdb>=0.4.0", + "museval>=0.4.0", + "asteroid-filterbanks>=0.3.2", + "onnx", + "tqdm", +] -[build-system] -requires = ["setuptools >=61"] -build-backend = "setuptools.build_meta" +[project.scripts] +umx = "openunmix.cli:separate" -[tool.setuptools.dynamic] -readme = {file = ["LICENSE"]} +[project.urls] +Homepage = "https://github.com/sigsep/open-unmix-pytorch" [tool.black] line-length = 120 @@ -36,8 +75,13 @@ exclude = ''' | \.vscode | scripts | notebooks - | separate.egg-info | \.eggs )/ ) ''' + +[tool.setuptools.packages.find] +where = ["openunmix"] + +[tool.setuptools.package-data] +openunmix = ["*.txt", "*.rst", "*.json", "*.wav", "*.pt"] \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100644 index c9e7ecdc..00000000 --- a/setup.py +++ /dev/null @@ -1,45 +0,0 @@ -from setuptools import setup, find_packages - -umx_version = "1.2.1" - -with open("README.md", encoding="utf-8") as fh: - long_description = fh.read() - -setup( - name="openunmix", - version=umx_version, - author="Fabian-Robert Stöter", - author_email="fabian-robert.stoter@inria.fr", - url="https://github.com/sigsep/open-unmix-pytorch", - description="PyTorch-based music source separation toolkit", - long_description=long_description, - long_description_content_type="text/markdown", - license="MIT", - python_requires=">=3.6", - install_requires=["numpy", "torchaudio>=0.9.0", "torch>=1.9.0", "tqdm"], - extras_require={ - "asteroid": ["asteroid-filterbanks>=0.3.2"], - "tests": [ - "pytest", - "musdb>=0.4.0", - "museval>=0.4.0", - "asteroid-filterbanks>=0.3.2", - "onnx", - "tqdm", - ], - "stempeg": ["stempeg"], - "evaluation": ["musdb>=0.4.0", "museval>=0.4.0"], - }, - entry_points={"console_scripts": ["umx=openunmix.cli:separate"]}, - packages=find_packages(), - include_package_data=True, - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent", - ], -)