Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
fireundubh committed Jan 10, 2020
2 parents a019961 + c6dbeb2 commit a2b6d5a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/nuitka.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ jobs:
- name: Install dependencies
if: success()
run: pipenv install
- name: Activate Pipenv
if: success()
run: pipenv shell
- name: Run build script
if: success()
run: python D:\a\pyro\pyro\build.py --no-zip
Expand Down
9 changes: 7 additions & 2 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class Application:
def __init__(self, args: argparse.Namespace) -> None:
self.root_path: str = os.path.dirname(__file__)

self.pipenv_cmd: str = args.pipenv_cmd
self.package_name: str = 'pyro'
self.no_zip: bool = args.no_zip
self.vcvars64_path: str = args.vcvars64_path
Expand Down Expand Up @@ -118,7 +119,7 @@ def run(self) -> int:
environ[key] = value

args: list = [
sys.executable, '-m', 'nuitka',
self.pipenv_cmd, 'run', 'python', '-m', 'nuitka',
'--standalone', 'pyro',
'--include-package=pyro',
'--experimental=use_pefile',
Expand All @@ -132,7 +133,7 @@ def run(self) -> int:

try:
process = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True, env=environ)
except FileNotFoundError:
except FileNotFoundError as e:
Application.log.error(f'Cannot run command: {" ".join(args)}')
fail_state = 1

Expand Down Expand Up @@ -212,6 +213,10 @@ def run(self) -> int:
if __name__ == '__main__':
_parser = argparse.ArgumentParser(description='Pyro Build Script')

_parser.add_argument('--pipenv-cmd',
action='store', default='pipenv',
help='command to use for pipenv')

_parser.add_argument('--no-zip',
action='store_true', default=False,
help='do not create zip archive')
Expand Down

0 comments on commit a2b6d5a

Please sign in to comment.