Skip to content

Commit

Permalink
Adding function to generate module names
Browse files Browse the repository at this point in the history
  • Loading branch information
bigbitbus committed Jan 3, 2022
1 parent a69ca31 commit dfd48dc
Showing 1 changed file with 45 additions and 31 deletions.
76 changes: 45 additions & 31 deletions opta.spec
Original file line number Diff line number Diff line change
@@ -1,40 +1,54 @@
# -*- mode: python ; coding: utf-8 -*-

from PyInstaller.utils.hooks import collect_data_files
import os
def generate_module_import_array():
himps = []
for root, dirs, files in os.walk("./modules"):
for filename in files:
if filename.endswith(".py") and not filename.startswith("test"):
modname = filename.split(".py")[0]
himps.append(".".join(["modules", modname, modname]))
return himps



block_cipher = None

himps = [
"modules.aws_k8s_service.aws_k8s_service",
"modules.aws_k8s_base.aws_k8s_base",
"modules.datadog.datadog",
"modules.gcp_k8s_base.gcp_k8s_base",
"modules.gcp_k8s_service.gcp_k8s_service",
"modules.gcp_gke.gcp_gke",
"modules.aws_dns.aws_dns",
"modules.aws_documentdb.aws_documentdb",
"modules.runx.runx",
"modules.helm_chart.helm_chart",
"modules.aws_iam_role.aws_iam_role",
"modules.aws_iam_user.aws_iam_user",
"modules.aws_eks.aws_eks",
"modules.aws_ses.aws_ses",
"modules.aws_sqs.aws_sqs",
"modules.aws_sns.aws_sns",
"modules.azure_base.azure_base",
"modules.azure_k8s_base.azure_k8s_base",
"modules.azure_k8s_service.azure_k8s_service",
"modules.local_k8s_service.local_k8s_service",
"modules.external_ssl_cert.external_ssl_cert",
"modules.aws_s3.aws_s3",
"modules.gcp_dns.gcp_dns",
"modules.gcp_service_account.gcp_service_account",
"modules.custom_terraform.custom_terraform",
"modules.aws_dynamodb.aws_dynamodb",
"modules.mongodb_atlas.mongodb_atlas",
"modules.cloudfront_distribution.cloudfront_distribution",
"modules.lambda_function.lambda_function"
]
himps = generate_module_import_array()
# himps = [
# "modules.aws_k8s_service.aws_k8s_service",
# "modules.aws_k8s_base.aws_k8s_base",
# "modules.datadog.datadog",
# "modules.gcp_k8s_base.gcp_k8s_base",
# "modules.gcp_k8s_service.gcp_k8s_service",
# "modules.gcp_gke.gcp_gke",
# "modules.aws_dns.aws_dns",
# "modules.aws_documentdb.aws_documentdb",
# "modules.runx.runx",
# "modules.helm_chart.helm_chart",
# "modules.aws_iam_role.aws_iam_role",
# "modules.aws_iam_user.aws_iam_user",
# "modules.aws_eks.aws_eks",
# "modules.aws_ses.aws_ses",
# "modules.aws_sqs.aws_sqs",
# "modules.aws_sns.aws_sns",
# "modules.azure_base.azure_base",
# "modules.azure_k8s_base.azure_k8s_base",
# "modules.azure_k8s_service.azure_k8s_service",
# "modules.local_k8s_service.local_k8s_service",
# "modules.external_ssl_cert.external_ssl_cert",
# "modules.aws_s3.aws_s3",
# "modules.gcp_dns.gcp_dns",
# "modules.gcp_service_account.gcp_service_account",
# "modules.custom_terraform.custom_terraform",
# "modules.aws_dynamodb.aws_dynamodb",
# "modules.mongodb_atlas.mongodb_atlas",
# "modules.cloudfront_distribution.cloudfront_distribution",
# "modules.lambda_function.lambda_function"
# ]
print(himps)

a = Analysis(['opta/cli.py'],
pathex=[],
binaries=[],
Expand Down

0 comments on commit dfd48dc

Please sign in to comment.