fix: conda deploy

This commit is contained in:
Félix Voituret
2019-11-19 11:27:34 +01:00
parent ff539bd26c
commit 2c6c927f47
3 changed files with 43 additions and 35 deletions

View File

@@ -5,33 +5,36 @@
# @licence MIT Licence
# =======================================================
FFEDSTOCK = spleeter-feedstock
FEEDSTOCK_REPOSITORY = https://github.com/deezer/$(FEEDSTOCK)
FEEDSTOCK_RECIPE = $(FEEDSTOCK)/recipe/spleeter/meta.yaml
all: clean build test deploy
clean:
rm -Rf *.egg-info
rm -Rf dist
build:
@echo "=== Build CPU bdist package"
python3 setup.py sdist
@echo "=== CPU version checksum"
@openssl sha256 dist/*.tar.gz
build-gpu:
@echo "=== Build GPU bdist package"
python3 setup.py sdist --target gpu
@echo "=== GPU version checksum"
@openssl sha256 dist/*.tar.gz
pip-dependencies:
pip install twine
test: pip-dependencies
test:
pytest -W ignore::FutureWarning -W ignore::DeprecationWarning -vv --forked
test-distribution: pip-dependencies
bash tests/test_pypi_sdist.sh
feedstock: build
$(eval VERSION = $(shell grep 'project_version = ' setup.py | cut -d' ' -f3 | sed "s/'//g"))
$(eval CHECKSUM = $(shell openssl sha256 dist/spleeter-$(VERSION).tar.gz | cut -d' ' -f2))
git clone $(FEEDSTOCK_REPOSITORY)
sed 's/{% set version = "[0-9]*\.[0-9]*\.[0-9]*" %}/{% set version = "$(VERSION)" %}/g' $(FEEDSTOCK_RECIPE)
sed 's/sha256: [0-9a-z]*/sha: $(CHECKSUM)/g' $(FEEDSTOCK_RECIPE)
git config credential.helper 'cache --timeout=120'
git config user.email "research@deezer.com"
git config user.name "spleeter-ci"
git add recipe/spleeter/meta.yaml
git commit --allow-empty -m "feat: update spleeter version from CI"
git push -q https://$$FEEDSTOCK_TOKEN@github.com/deezer/$(FEEDSTOCK)
hub pull-request -m "Update spleeter version to $(VERSION)"
deploy: pip-dependencies
twine upload dist/*
all: clean test build build-gpu upload
pip install twine
twine upload dist/*