Merge "Restructure lib directory to install via pip"

This commit is contained in:
Jenkins 2017-04-06 16:11:02 +00:00 committed by Gerrit Code Review
commit 8181ab5881
17 changed files with 12 additions and 9 deletions

View File

@ -20,7 +20,7 @@ import os
import sys
current_path = os.path.abspath(os.path.dirname(os.path.realpath(__file__)))
lib_path = os.path.join(current_path, '..', '..', 'lib')
lib_path = os.path.join(current_path, '..', '..', 'osa_toolkit')
sys.path.append(lib_path)
import generate

View File

@ -20,7 +20,7 @@ import os
import sys
cwd = os.path.abspath(os.path.dirname(__file__))
import_path = os.path.join(cwd, '..', 'lib')
import_path = os.path.join(cwd, '..', 'osa_toolkit')
sys.path.append(import_path)
import tools

View File

@ -27,7 +27,7 @@ import os
import sys
cwd = os.path.abspath(os.path.dirname(__file__))
import_path = os.path.join(cwd, '..', 'lib')
import_path = os.path.join(cwd, '..', 'osa_toolkit')
sys.path.append(import_path)
import manage

View File

@ -22,3 +22,6 @@ warnerrors = True
[wheel]
universal = 1
[files]
packages = osa_toolkit

View File

@ -17,7 +17,7 @@ from os import path
import sys
import unittest
LIB_DIR = 'lib'
LIB_DIR = 'osa_toolkit'
sys.path.append(path.join(os.getcwd(), LIB_DIR))

View File

@ -24,7 +24,7 @@ from test_inventory import get_inventory
from test_inventory import make_config
INV_DIR = 'playbooks/inventory'
LIB_DIR = 'lib'
LIB_DIR = 'osa_toolkit'
sys.path.append(path.join(os.getcwd(), LIB_DIR))
sys.path.append(path.join(os.getcwd(), INV_DIR))

View File

@ -23,7 +23,7 @@ import warnings
import yaml
INV_DIR = 'playbooks/inventory'
LIB_DIR = 'lib'
LIB_DIR = 'osa_toolkit'
sys.path.append(path.join(os.getcwd(), LIB_DIR))
sys.path.append(path.join(os.getcwd(), INV_DIR))

View File

@ -17,7 +17,7 @@ from os import path
import sys
import unittest
LIB_DIR = path.join(os.getcwd(), 'lib')
LIB_DIR = path.join(os.getcwd(), 'osa_toolkit')
sys.path.append(LIB_DIR)

View File

@ -18,7 +18,7 @@ import sys
import test_inventory
import unittest
MANAGE_DIR = path.join(os.getcwd(), 'lib')
MANAGE_DIR = path.join(os.getcwd(), 'osa_toolkit')
TARGET_DIR = path.join(os.getcwd(), 'tests', 'inventory')
sys.path.append(MANAGE_DIR)

View File

@ -154,7 +154,7 @@ commands =
coverage run -a {toxinidir}/tests/test_dictutils.py
coverage run -a {toxinidir}/tests/test_ip.py
coverage run -a {toxinidir}/tests/test_filesystem.py
coverage report --show-missing --include={toxinidir}/playbooks/inventory/*,{toxinidir}/lib/*
coverage report --show-missing --include={toxinidir}/playbooks/inventory/*,{toxinidir}/osa_toolkit/*
[testenv:linters]