From 4a4d7172a567abcfea69ed96fefa736a4441ed81 Mon Sep 17 00:00:00 2001 From: Louis Brunner Date: Wed, 15 Jul 2020 11:07:49 +0100 Subject: [PATCH] Don't import __version__ as __init__ will be executed and try to import uninstalled dependencies --- .github/workflows/publish.yml | 1 + setup.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 15ed7e7..a5af87f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -25,6 +25,7 @@ jobs: run: | export VERSION=`echo $VERSION_RAW | sed -E 's;.*/v(.*)$;\1;'` sed -i 's/%VERSION%/'$VERSION'/' evasdk/version.py + sed -i 's/%VERSION%/'$VERSION'/' setup.py python setup.py sdist bdist_wheel - name: Publish a Python distribution to PyPI uses: pypa/gh-action-pypi-publish@v1.3.0 diff --git a/setup.py b/setup.py index f046ecd..01201b2 100644 --- a/setup.py +++ b/setup.py @@ -1,12 +1,13 @@ import setuptools -from evasdk.version import __version__ + +version = '%VERSION%' # Replaced by the publish.yml workflow with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name='evasdk', - version=__version__, + version=version, description='SDK for the Automata Eva robotic arm', author='Automata', license='Apache License 2.0',