From 1dd6028e143264781f19b26d4dc4ef156ae4f96d Mon Sep 17 00:00:00 2001 From: Russell Bunch Date: Thu, 17 Nov 2022 11:31:38 -0600 Subject: [PATCH] Fixes #237 --- .gitignore | 5 ++- MANIFEST.in | 11 +++++-- pyinstaller.py | 84 +------------------------------------------------- setup.py | 4 +-- 4 files changed, 16 insertions(+), 88 deletions(-) diff --git a/.gitignore b/.gitignore index 0ffa6611e..97484ceec 100644 --- a/.gitignore +++ b/.gitignore @@ -49,4 +49,7 @@ docs/_build pylintrc pylintrc.test -test_data/* \ No newline at end of file +test_data/* + +# Shasta Cabling Diagrams +*.xlsx \ No newline at end of file diff --git a/MANIFEST.in b/MANIFEST.in index a023d0b4b..d32876b67 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -21,6 +21,13 @@ # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR # OTHER DEALINGS IN THE SOFTWARE. # -include README.md include LICENSE -global-include *.yaml \ No newline at end of file +include README.md +global-include *.yaml +global-include *.j2 +include canu/generate/switch/config/ttp_templates/*.txt +include canu/utils/sls_utils/schemas/*.json +include canu/validate/switch/config/*.yaml +include network_modeling/mac_vendors +include network_modeling/models/* +include network_modeling/schema/paddle-schema.json diff --git a/pyinstaller.py b/pyinstaller.py index 7da108b56..e74f595b2 100644 --- a/pyinstaller.py +++ b/pyinstaller.py @@ -23,93 +23,11 @@ block_cipher = None -added_files = [ - ("canu/canu.yaml", "canu"), - ("canu/validate/switch/config/*.yaml", "canu/validate/switch/config"), - ("network_modeling/models/*", "network_modeling/models"), - ("network_modeling/mac_vendors", "network_modeling"), - ("network_modeling/schema/*", "network_modeling/schema"), - ( - "network_modeling/configs/templates/1.0/aruba/common/*.j2", - "network_modeling/configs/templates/1.0/aruba/common", - ), - ( - "network_modeling/configs/templates/1.0/aruba/full/*.j2", - "network_modeling/configs/templates/1.0/aruba/full", - ), - ( - "network_modeling/configs/templates/1.0/aruba/tds/*.j2", - "network_modeling/configs/templates/1.0/aruba/tds", - ), - ( - "network_modeling/configs/templates/1.0/dellmellanox/common/*.j2", - "network_modeling/configs/templates/1.0/dellmellanox/common", - ), - ( - "network_modeling/configs/templates/1.0/dellmellanox/full/*.j2", - "network_modeling/configs/templates/1.0/dellmellanox/full", - ), - ( - "network_modeling/configs/templates/1.2/arista/*.j2", - "network_modeling/configs/templates/1.2/arista", - ), - ( - "network_modeling/configs/templates/1.2/aruba/common/*.j2", - "network_modeling/configs/templates/1.2/aruba/common", - ), - ( - "network_modeling/configs/templates/1.2/aruba/full/*.j2", - "network_modeling/configs/templates/1.2/aruba/full", - ), - ( - "network_modeling/configs/templates/1.2/aruba/tds/*.j2", - "network_modeling/configs/templates/1.2/aruba/tds", - ), - ( - "network_modeling/configs/templates/1.2/dellmellanox/common/*.j2", - "network_modeling/configs/templates/1.2/dellmellanox/common", - ), - ( - "network_modeling/configs/templates/1.2/dellmellanox/full/*.j2", - "network_modeling/configs/templates/1.2/dellmellanox/full", - ), - ( - "network_modeling/configs/templates/1.3/arista/*.j2", - "network_modeling/configs/templates/1.3/arista", - ), - ( - "network_modeling/configs/templates/1.3/aruba/common/*.j2", - "network_modeling/configs/templates/1.3/aruba/common", - ), - ( - "network_modeling/configs/templates/1.3/aruba/full/*.j2", - "network_modeling/configs/templates/1.3/aruba/full", - ), - ( - "network_modeling/configs/templates/1.3/aruba/tds/*.j2", - "network_modeling/configs/templates/1.3/aruba/tds", - ), - ( - "network_modeling/configs/templates/1.3/dellmellanox/common/*.j2", - "network_modeling/configs/templates/1.3/dellmellanox/common", - ), - ( - "network_modeling/configs/templates/1.3/dellmellanox/full/*.j2", - "network_modeling/configs/templates/1.3/dellmellanox/full", - ), - ("canu/test/aruba/test_suite.yaml", "canu/test/aruba"), - ("canu/test/dellanox/test_suite.yaml", "canu/test/dellanox"), - ( - "canu/generate/switch/config/ttp_templates/*.txt", - "canu/generate/switch/config/ttp_templates", - ), - ("canu/utils/sls_utils/schemas/*.json", "canu/utils/sls_utils/schemas"), -] a = Analysis( ["canu/cli.py"], pathex=["canu"], binaries=[], - datas=added_files, + datas=[], hiddenimports=["network_modeling"], hookspath=["./pyinstaller_hooks"], runtime_hooks=[], diff --git a/setup.py b/setup.py index 3fb94ec2f..2f0f9c02b 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ import pkg_resources -from setuptools import find_packages +from setuptools import find_namespace_packages from setuptools import setup version_re = re.compile("^Version: (.+)$", re.M) @@ -100,7 +100,7 @@ def get_version(): long_description=readme(), version=get_version(), license=LICENSE, - packages=find_packages(), + packages=find_namespace_packages(), include_package_data=True, zip_safe=False, exclude_package_data={"canu": ["canu_cache.yaml"]},