From 87e01a7c52629430a47ee88cc60d54a578051535 Mon Sep 17 00:00:00 2001 From: Andre Anjos <andre.anjos@idiap.ch> Date: Wed, 11 Oct 2017 15:09:05 +0200 Subject: [PATCH] Create source distribution before twining it to PyPI --- gitlab/deploy.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gitlab/deploy.sh b/gitlab/deploy.sh index b8fe6bf..5da571c 100755 --- a/gitlab/deploy.sh +++ b/gitlab/deploy.sh @@ -15,6 +15,13 @@ if [ "${VISIBILITY}" != "public" ]; then exit 0 fi +log_info "Creating source distribution..." +run_cmd $(PREFIX)/bin/python setup.py check sdist --formats zip +if [ $? != 0 ]; then + log_error "Could not create source distribution zip file" + exit 1 +fi + log_info "Uploading package to ${PYPISERVER} on behalf of ${PYPIUSER}..." twine register --username ${PYPIUSER} --password ${PYPIPASS} dist/*.zip twine upload --username ${PYPIUSER} --password ${PYPIPASS} dist/*.zip -- GitLab