Merge "Restructure lib directory to install via pip"
This commit is contained in:
commit
8181ab5881
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -22,3 +22,6 @@ warnerrors = True
|
||||
|
||||
[wheel]
|
||||
universal = 1
|
||||
|
||||
[files]
|
||||
packages = osa_toolkit
|
||||
|
@ -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))
|
||||
|
||||
|
@ -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))
|
||||
|
@ -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))
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
2
tox.ini
2
tox.ini
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user