Skip to content

Commit c103ba4

Browse files
committed
Adjust imports and main module for setup.py script support
1 parent 34a34e6 commit c103ba4

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

codeql_bundle/codeql-bundle.py renamed to codeql_bundle/cli.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import click
22
from pathlib import Path
3-
from helpers.codeql import CodeQLException
4-
from helpers.bundle import CustomBundle, BundleException
3+
from codeql_bundle.helpers.codeql import CodeQLException
4+
from codeql_bundle.helpers.bundle import CustomBundle, BundleException
55
from typing import List
66
import sys
77
import logging
@@ -42,7 +42,7 @@
4242
default="WARNING",
4343
)
4444
@click.argument("packs", nargs=-1)
45-
def cli(
45+
def main(
4646
bundle_path: Path,
4747
output: Path,
4848
workspace: Path,
@@ -110,4 +110,4 @@ def cli(
110110

111111

112112
if __name__ == "__main__":
113-
cli()
113+
main()

codeql_bundle/helpers/bundle.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
from helpers.codeql import CodeQL, CodeQLException, ResolvedCodeQLPack, CodeQLPackKind
1+
from codeql_bundle.helpers.codeql import (
2+
CodeQL,
3+
CodeQLException,
4+
ResolvedCodeQLPack,
5+
CodeQLPackKind,
6+
)
27
from pathlib import Path
38
from tempfile import TemporaryDirectory
49
import tarfile

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ click = "^8.1.3"
1212
semantic-version = "^2.10.0"
1313
pyyaml = "^6.0"
1414

15+
[tool.poetry.scripts]
16+
codeql-bundle = 'codeql_bundle.cli:main'
1517

1618
[build-system]
1719
requires = ["poetry-core"]

0 commit comments

Comments
 (0)