From c671adabcae728fb6992bb91001838b3b9cbfd8a Mon Sep 17 00:00:00 2001 From: Daniel Bluhm Date: Thu, 27 Jun 2019 11:58:12 -0400 Subject: [PATCH 1/2] Make test dependencies installable as an extra Signed-off-by: Daniel Bluhm --- wrappers/python/setup.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/wrappers/python/setup.py b/wrappers/python/setup.py index 6d488e9843..bfe47f9d9d 100644 --- a/wrappers/python/setup.py +++ b/wrappers/python/setup.py @@ -3,6 +3,10 @@ PKG_VERSION = os.environ.get('PACKAGE_VERSION') or '1.9.0' +TEST_DEPS = [ + 'pytest<3.7', 'pytest-asyncio', 'base58' +] + setup( name='python3-indy', version=PKG_VERSION, @@ -13,5 +17,8 @@ author_email='vyacheslav.gudkov@dsr-company.com', description='This is the official SDK for Hyperledger Indy (https://www.hyperledger.org/projects), which provides a distributed-ledger-based foundation for self-sovereign identity (https://sovrin.org). The major artifact of the SDK is a c-callable library.', install_requires=['base58'], - tests_require=['pytest<3.7', 'pytest-asyncio', 'base58'] + tests_require=TEST_DEPS, + extras_require={ + 'test': TEST_DEPS + } ) From 21aeb9392646be87bceabccf1c1a1dfc9f6a1122 Mon Sep 17 00:00:00 2001 From: Daniel Bluhm Date: Thu, 27 Jun 2019 12:01:54 -0400 Subject: [PATCH 2/2] Update CI/CD: install test deps for python wrapper through pip extras support Signed-off-by: Daniel Bluhm --- Jenkinsfile.cd | 2 +- Jenkinsfile.ci | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile.cd b/Jenkinsfile.cd index ba06e6f0c9..ab5bdd83b0 100644 --- a/Jenkinsfile.cd +++ b/Jenkinsfile.cd @@ -451,7 +451,7 @@ def linuxPythonTesting(env_name, network_name, testEnv, stashBuildResults) { echo "${env_name} Libindy Test: Test python wrapper" sh ''' - python3.5 -m pip install --user -e . pytest==3.6.4 pytest-asyncio + python3.5 -m pip install --user -e .[test] LD_LIBRARY_PATH=./:${LD_LIBRARY_PATH} RUST_LOG=indy::=debug TEST_POOL_IP=10.0.0.2 python3.5 -m pytest ''' } diff --git a/Jenkinsfile.ci b/Jenkinsfile.ci index 17bc84f969..5f278eb765 100644 --- a/Jenkinsfile.ci +++ b/Jenkinsfile.ci @@ -619,7 +619,7 @@ def linuxPythonTesting(env_name, network_name, testEnv) { echo "${env_name} Libindy Test: Test python wrapper" sh ''' - python3.5 -m pip install --user -e . pytest==3.6.4 pytest-asyncio + python3.5 -m pip install --user -e .[test] LD_LIBRARY_PATH=./:${LD_LIBRARY_PATH} TEST_POOL_IP=10.0.0.2 python3.5 -m pytest ''' }