From af40eb82b31fa2deefcceca447f5cbddf9a25999 Mon Sep 17 00:00:00 2001 From: Kacper Date: Tue, 26 Jun 2018 21:56:44 +0200 Subject: [PATCH 1/2] Updated erpc_python/setup.py * fix premature import of package, causing failure when attempting installation of Python library in a clean environment. --- erpc_python/setup.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/erpc_python/setup.py b/erpc_python/setup.py index 34954f0ba..fe963653f 100644 --- a/erpc_python/setup.py +++ b/erpc_python/setup.py @@ -33,7 +33,6 @@ # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from setuptools import setup -from erpc import erpc_version from codecs import open from os import path @@ -42,6 +41,9 @@ with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() +with open(path.join(here, 'erpc', 'erpc_version.py')) as f: + exec(f.read()) + #steps: https://packaging.python.org/distributing/ #source distribution: python setup.py sdist #wheel distribution: python setup.py bdist_wheel @@ -49,7 +51,7 @@ setup( name="erpc", - version=erpc_version.ERPC_VERSION, + version=ERPC_VERSION, description="eRPC Python infrastructure", long_description=long_description, author="NXP", From 3544db8c63a1844a9b1e04197746289f0e2dce79 Mon Sep 17 00:00:00 2001 From: kacper-ka Date: Tue, 11 Jan 2022 14:37:27 +0100 Subject: [PATCH 2/2] Update setup.py Apply review suggestion: initialize ERPC_VERSION to None --- erpc_python/setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpc_python/setup.py b/erpc_python/setup.py index fe963653f..b0ec78f01 100644 --- a/erpc_python/setup.py +++ b/erpc_python/setup.py @@ -36,6 +36,7 @@ from codecs import open from os import path +ERPC_VERSION = None here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.rst'), encoding='utf-8') as f: