summaryrefslogtreecommitdiffstats
path: root/clamp-policy
diff options
context:
space:
mode:
authorMiroslav Los <miroslav.los@pantheon.tech>2019-11-26 14:20:36 +0100
committerMiroslav Los <miroslav.los@pantheon.tech>2019-11-26 19:24:24 +0100
commit01a60ff23b979eb676658713748598ba4892163a (patch)
tree1fb1b260c3723ddc42f047796db6b1928171b48c /clamp-policy
parent77e27adeab5ff155b690f2e058c06f0a7812e225 (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 'clamp-policy')
-rw-r--r--clamp-policy/requirements.txt4
-rw-r--r--clamp-policy/setup.py4
-rw-r--r--clamp-policy/tox-local.ini8
-rw-r--r--clamp-policy/tox.ini10
4 files changed, 12 insertions, 14 deletions
diff --git a/clamp-policy/requirements.txt b/clamp-policy/requirements.txt
index 025de9d..e9526b8 100644
--- a/clamp-policy/requirements.txt
+++ b/clamp-policy/requirements.txt
@@ -1 +1,3 @@
-requests>=2.11.0,<3.0.0 \ No newline at end of file
+requests>=2.11.0
+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/clamp-policy/setup.py b/clamp-policy/setup.py
index de6b119..25ad51b 100644
--- a/clamp-policy/setup.py
+++ b/clamp-policy/setup.py
@@ -1,5 +1,6 @@
# ================================================================================
# Copyright (c) 2019 Wipro Limited 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.
@@ -26,7 +27,8 @@ setup(
author='Vignesh K',
packages=['clamppolicyplugin'],
install_requires=[
- "requests>=2.11.0,<3.0.0"
+ 'requests>=2.11.0',
+ 'cloudify-common>=5.0.0',
],
keywords='clamp policy model cloudify plugin',
classifiers=[
diff --git a/clamp-policy/tox-local.ini b/clamp-policy/tox-local.ini
index ad84024..e41b3f4 100644
--- a/clamp-policy/tox-local.ini
+++ b/clamp-policy/tox-local.ini
@@ -1,15 +1,13 @@
# tox -c tox-local.ini | tee -a logs/test_clamppolicyplugin.log 2>&1
[tox]
-envlist = py27
+envlist = py27,py36
[testenv]
deps=
-rrequirements.txt
- cloudify-plugins-common==3.4
pytest
coverage
pytest-cov
-setenv =
- PYTHONPATH={toxinidir}
# recreate = True
-commands=pytest -v --cov clamppolicyplugin --cov-report html
+commands=
+ pytest -v --cov clamppolicyplugin --cov-report html
diff --git a/clamp-policy/tox.ini b/clamp-policy/tox.ini
index 3974a7e..9e09c4a 100644
--- a/clamp-policy/tox.ini
+++ b/clamp-policy/tox.ini
@@ -1,17 +1,13 @@
# content of: tox.ini , put in same dir as setup.py
[tox]
-envlist = py27
+envlist = py27,py36
[testenv]
deps=
-rrequirements.txt
- cloudify-plugins-common==3.4
pytest
coverage
pytest-cov
-setenv =
- PYTHONPATH={toxinidir}
commands=
- -mkdir logs
- pytest --junitxml xunit-results.xml --cov clamppolicyplugin --cov-report xml
- coverage xml
+ pytest --junitxml xunit-results.xml --cov clamppolicyplugin --cov-report xml
+ coverage xml