From a94f194750049dfd61f73d18883b323aa441c73d Mon Sep 17 00:00:00 2001 From: Faylixe Date: Mon, 7 Dec 2020 12:37:45 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20=E2=9C=A8=20add=20conda=20CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/conda.yml | 28 ++++++++++++++++++++ conda/cpu/bld.bat | 2 ++ conda/cpu/build.sh | 3 +++ conda/cpu/meta.yaml | 51 +++++++++++++++++++++++++++++++++++++ 4 files changed, 84 insertions(+) create mode 100644 .github/workflows/conda.yml create mode 100644 conda/cpu/bld.bat create mode 100644 conda/cpu/build.sh create mode 100644 conda/cpu/meta.yaml diff --git a/.github/workflows/conda.yml b/.github/workflows/conda.yml new file mode 100644 index 0000000..907adac --- /dev/null +++ b/.github/workflows/conda.yml @@ -0,0 +1,28 @@ +name: pypi +on: + push: + branches: + - master +env: + ANACONDA_USERNAME: ${{ secrets.ANACONDA_USERNAME }} + ANACONDA_PASSWORD: ${{ secrets.ANACONDA_PASSWORD }} +jobs: + package-and-deploy: + strategy: + matrix: + platform: [cpu, gpu] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup conda + uses: s-weigand/setup-conda@v1 + with: + update-conda: true + python-version: ${{ matrix.python-version }} + conda-channels: anaconda, conda-forge + - name: Setup conda-build + run: conda install conda-build + - name: Setup anaconda-client + run: conda install anaconda-client + - name: Build package + run: cd conda/cpu && conda-build spleeter diff --git a/conda/cpu/bld.bat b/conda/cpu/bld.bat new file mode 100644 index 0000000..6021130 --- /dev/null +++ b/conda/cpu/bld.bat @@ -0,0 +1,2 @@ +"%PYTHON%" setup.py install +if errorlevel 1 exit 1 \ No newline at end of file diff --git a/conda/cpu/build.sh b/conda/cpu/build.sh new file mode 100644 index 0000000..55ea547 --- /dev/null +++ b/conda/cpu/build.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +$PYTHON setup.py install \ No newline at end of file diff --git a/conda/cpu/meta.yaml b/conda/cpu/meta.yaml new file mode 100644 index 0000000..32d90a7 --- /dev/null +++ b/conda/cpu/meta.yaml @@ -0,0 +1,51 @@ +{% set name = "spleeter" %} +{% set version = "2.0.2" %} + +package: + name: {{ name|lower }} + version: {{ version }} + +source: + - url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz + sha256: ecd3518a98f9978b9088d1cb2ef98f766401fd9007c2bf72a34e5b5bc5a6fdc3 + +build: + number: 0 + script: {{ PYTHON }} -m pip install . -vv + skip: true # [py<37 or py>38 or osx or win] + entry_points: + - spleeter = spleeter.__main__:entrypoint + +requirements: + host: + - python {{ python }} + - pip + run: + - python {{ python }} + - tensorflow ==2.3.0 + - pandas + - ffmpeg-python + - norbert + - librosa + +test: + imports: + - spleeter + - spleeter.commands + - spleeter.model + - spleeter.utils + - spleeter.separator + +about: + home: https://github.com/deezer/spleeter + license: MIT + license_family: MIT + license_file: LICENSE + summary: The Deezer source separation library with pretrained models based on tensorflow. + doc_url: https://github.com/deezer/spleeter/wiki + dev_url: https://github.com/deezer/spleeter + +extra: + recipe-maintainers: + - Faylixe + - romi1502 \ No newline at end of file