Pip standerdization and tox replacement
Change-Id: Ic8e6495c9c0a4b46e876fb9f2f8376b7c210f545
Signed-off-by: sousaedu <eduardo.sousa@canonical.com>
diff --git a/RO-plugin/Makefile b/RO-plugin/Makefile
deleted file mode 100644
index 3522b72..0000000
--- a/RO-plugin/Makefile
+++ /dev/null
@@ -1,24 +0,0 @@
-##
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-# implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-##
-
-all: clean package
-
-clean:
- rm -rf dist deb_dist osm_ro_plugin-*.tar.gz osm_ro_plugin.egg-info .eggs
-
-package:
- python3 setup.py --command-packages=stdeb.command sdist_dsc
- cd deb_dist/osm-ro-plugin*/ && dpkg-buildpackage -rfakeroot -uc -us
-
diff --git a/RO-plugin/requirements.txt b/RO-plugin/osm_ro_plugin/__init__.py
similarity index 88%
rename from RO-plugin/requirements.txt
rename to RO-plugin/osm_ro_plugin/__init__.py
index 64c65b4..94a6a32 100644
--- a/RO-plugin/requirements.txt
+++ b/RO-plugin/osm_ro_plugin/__init__.py
@@ -1,4 +1,6 @@
-##
+#!/usr/bin/env python3
+# Copyright ETSI Contributors and Others.
+#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@@ -12,7 +14,3 @@
# See the License for the specific language governing permissions and
# limitations under the License.
##
-
-PyYAML
-paramiko
-requests
diff --git a/RO-plugin/requirements.txt b/RO-plugin/osm_ro_plugin/tests/__init__.py
similarity index 70%
copy from RO-plugin/requirements.txt
copy to RO-plugin/osm_ro_plugin/tests/__init__.py
index 64c65b4..04f7d49 100644
--- a/RO-plugin/requirements.txt
+++ b/RO-plugin/osm_ro_plugin/tests/__init__.py
@@ -1,4 +1,6 @@
-##
+#######################################################################################
+# Copyright ETSI Contributors and Others.
+#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@@ -11,8 +13,4 @@
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-##
-
-PyYAML
-paramiko
-requests
+#######################################################################################
diff --git a/RO-plugin/setup.py b/RO-plugin/setup.py
index 09c921e..6a6ce39 100644
--- a/RO-plugin/setup.py
+++ b/RO-plugin/setup.py
@@ -19,8 +19,16 @@
from setuptools import setup
_name = "osm_ro_plugin"
+_version_command = ("git describe --match v* --tags --long --dirty", "pep440-git-full")
+_description = "OSM ro base class for vim and SDN plugins"
+_author = "OSM Support"
+_author_email = "osmsupport@etsi.org"
+_maintainer = "OSM Support"
+_maintainer_email = "osmsupport@etsi.org"
+_license = "Apache 2.0"
+_url = "https://osm.etsi.org/gitweb/?p=osm/RO.git;a=summary"
-README = """
+_readme = """
===========
osm-ro_plugin
===========
@@ -30,26 +38,21 @@
setup(
name=_name,
- description="OSM ro base class for vim and SDN plugins",
- long_description=README,
- version_command=(
- "git describe --match v* --tags --long --dirty",
- "pep440-git-full",
- ),
- # version=VERSION,
- # python_requires='>3.5.0',
- author="ETSI OSM",
- author_email="alfonso.tiernosepulveda@telefonica.com",
- maintainer="Alfonso Tierno",
- maintainer_email="alfonso.tiernosepulveda@telefonica.com",
- url="https://osm.etsi.org/gitweb/?p=osm/RO.git;a=summary",
- license="Apache 2.0",
+ description=_description,
+ long_description=_readme,
+ version_command=_version_command,
+ author=_author,
+ author_email=_author_email,
+ maintainer=_maintainer,
+ maintainer_email=_maintainer_email,
+ url=_url,
+ license=_license,
packages=[_name],
include_package_data=True,
install_requires=[
- "requests",
- "paramiko",
- "PyYAML",
+ # "requests",
+ # "paramiko",
+ # "PyYAML",
],
setup_requires=["setuptools-version-command"],
entry_points={
diff --git a/RO-plugin/stdeb.cfg b/RO-plugin/stdeb.cfg
index f6f532e..262a47c 100644
--- a/RO-plugin/stdeb.cfg
+++ b/RO-plugin/stdeb.cfg
@@ -15,6 +15,3 @@
[DEFAULT]
X-Python3-Version : >= 3.5
-Maintainer: Alfonso Tierno <alfonso.tiernosepulveda@telefonica.com>
-Depends3: python3-paramiko, python3-requests, python3-yaml,
-
diff --git a/RO-plugin/tox.ini b/RO-plugin/tox.ini
deleted file mode 100644
index 4d8b9be..0000000
--- a/RO-plugin/tox.ini
+++ /dev/null
@@ -1,41 +0,0 @@
-##
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-# implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-##
-
-[tox]
-envlist = flake8
-toxworkdir={toxinidir}/../.tox
-
-[testenv]
-basepython = python3
-install_command = python3 -m pip install -r requirements.txt -U {opts} {packages}
-# deps = -r{toxinidir}/test-requirements.txt
-commands=python3 -m unittest discover -v
-
-[testenv:flake8]
-basepython = python3
-deps = flake8
-commands = flake8 osm_ro_plugin --max-line-length 120 \
- --exclude .svn,CVS,.gz,.git,__pycache__,.tox,local,temp --ignore W291,W293,W503,W605,E123,E125,E203,E226,E241
-
-[testenv:unittest]
-basepython = python3
-commands = python3 -m unittest osm_ro_plugin.tests
-
-[testenv:build]
-basepython = python3
-deps = stdeb
- setuptools-version-command
-commands = python3 setup.py --command-packages=stdeb.command bdist_deb
-