diff options
author | Miroslav Los <miroslav.los@pantheon.tech> | 2019-11-26 14:20:36 +0100 |
---|---|---|
committer | Miroslav Los <miroslav.los@pantheon.tech> | 2019-11-26 19:24:24 +0100 |
commit | 01a60ff23b979eb676658713748598ba4892163a (patch) | |
tree | 1fb1b260c3723ddc42f047796db6b1928171b48c /cdap | |
parent | 77e27adeab5ff155b690f2e058c06f0a7812e225 (diff) |
Support python3 in all plugins
Unify tox/requirements/setup.py requirement specifications.
Do not set upper version limits if possible.
Drop uuid as dependency included with standard library.
Drop import of unmaintained cloudify_importer without python3 version.
Use PEP 508 URLs in requirements for non-PyPI (github) releases.
Use cloudify-common 5 release; pre-release package for python3.
Rewrite uses of map with loops/comprehensions.
Signed-off-by: Miroslav Los <miroslav.los@pantheon.tech>
Issue-ID: DCAEGEN2-1956
Change-Id: I7b3ceb97a628e3af5bda3178d182f4207069e86d
Diffstat (limited to 'cdap')
-rw-r--r-- | cdap/cdapplugin/requirements.txt | 3 | ||||
-rw-r--r-- | cdap/cdapplugin/setup.py | 6 | ||||
-rw-r--r-- | cdap/cdapplugin/tox-local.ini | 9 | ||||
-rw-r--r-- | cdap/cdapplugin/tox.ini | 8 |
4 files changed, 14 insertions, 12 deletions
diff --git a/cdap/cdapplugin/requirements.txt b/cdap/cdapplugin/requirements.txt index ff93d4c..43a0ea1 100644 --- a/cdap/cdapplugin/requirements.txt +++ b/cdap/cdapplugin/requirements.txt @@ -1,2 +1,3 @@ onap-dcae-dcaepolicy-lib==1.0.0 -uuid==1.30 +cloudify-common>=5.0.0; python_version<"3" +cloudify-common @ git+https://github.com/cloudify-cosmo/cloudify-common@cy-1374-python3#egg=cloudify-common==5.0.0; python_version>="3" diff --git a/cdap/cdapplugin/setup.py b/cdap/cdapplugin/setup.py index 6ca9461..978af27 100644 --- a/cdap/cdapplugin/setup.py +++ b/cdap/cdapplugin/setup.py @@ -1,6 +1,7 @@ # org.onap.dcae # ================================================================================ # Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. +# Copyright (c) 2019 Pantheon.tech. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -32,7 +33,8 @@ setup( url = "https://gerrit.onap.org/r/#/admin/projects/dcaegen2/platform/plugins", zip_safe=False, install_requires = [ - "onap-dcae-dcaepolicy-lib>=1.0.0,<2.0.0" - "uuid==1.30" + # FIXME: not compatible with latest version + 'onap-dcae-dcaepolicy-lib==1.0.0', + 'cloudify-common>=5.0.0', ] ) diff --git a/cdap/cdapplugin/tox-local.ini b/cdap/cdapplugin/tox-local.ini index d553704..1664561 100644 --- a/cdap/cdapplugin/tox-local.ini +++ b/cdap/cdapplugin/tox-local.ini @@ -1,10 +1,11 @@ [tox] -envlist = py27 +envlist = py27,py36 + [testenv] deps= - -rrequirements.txt - cloudify==3.4 + -rrequirements.txt pytest coverage pytest-cov -commands=pytest --cov {envsitepackagesdir}/cdapcloudify --cov-report html +commands= + pytest --cov {envsitepackagesdir}/cdapcloudify --cov-report html diff --git a/cdap/cdapplugin/tox.ini b/cdap/cdapplugin/tox.ini index 2f4bb03..32445ed 100644 --- a/cdap/cdapplugin/tox.ini +++ b/cdap/cdapplugin/tox.ini @@ -1,14 +1,12 @@ [tox] -envlist = py27 +envlist = py27,py36 + [testenv] deps= - -rrequirements.txt - cloudify==3.4 + -rrequirements.txt pytest coverage pytest-cov -setenv= - PYTHONPATH={toxinidir} commands= pytest --junitxml xunit-results.xml --cov cdapcloudify --cov-report xml coverage xml |