Commit c00224c8 authored by nimrod's avatar nimrod
Browse files

Pyinstaller.

Build an executable using Pyinstaller. Add it as an artifact in the CI.
See if it runs.
parent e7c47b34
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -52,3 +52,4 @@ dist/
tfplan
*.tfstate*
*.venv
*.spec
+22 −0
Original line number Diff line number Diff line
@@ -21,8 +21,30 @@ build-wheel:
    paths:
      - dist/*.whl

build-executable:
  extends: .python3
  stage: build
  image: registry.shore.co.il/ci-images:python3-build
  before_script:
    - poetry install --no-dev
  script:
    - poetry run make
  artifacts:
    paths:
      - dist/mnpw

install-wheel:
  extends: .install-wheel
  script:
    - mnpw --help
    - mnpw --version

run-executable:
  image: registry.hub.docker.com/library/ubuntu:bionic
  stage: test
  script:
    - dist/mnpw --help
    - dist/mnpw --version
  needs:
    - job: build-executable
      artifacts: true

Makefile

0 → 100644
+9 −0
Original line number Diff line number Diff line
.PHONY: all
all: dist/mnpw

dist/mnpw: mnpw/*.py pyproject.toml *.rst LICENSE.txt
	pyinstaller --noconfirm --onefile "--name=$$(basename $@)" mnpw/__init__.py

.PHONY: clean
clean:
	git clean --force -X -d
+3 −1
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ classifiers = [
]
include = [
    "*.rst",
    "LICENSE.txt",
]
exclude = [
    "*.yaml",
@@ -25,11 +26,12 @@ exclude = [
]

[tool.poetry.dependencies]
python = "^3.6"
python = "^3.6.1"
requests = "^2.25.1"

[tool.poetry.dev-dependencies]
pre-commit = "^2.13.0"
pyinstaller = "^4.3"

[tool.poetry.scripts]
mnpw = "mnpw:main"