Skip to content

Commit

Permalink
use cx-Freeze
Browse files Browse the repository at this point in the history
  • Loading branch information
ojomio committed Dec 5, 2020
1 parent 39f14c4 commit f1d70c3
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 14 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ lint:
pretty:
black --target-version py38 --skip-string-normalization --line-length=100 $(CODE)
isort $(CODE)

build:
python ./setup.py bdist
85 changes: 71 additions & 14 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ python = "~3.8"
"Qt5.py" = "^0.1.0"
PyQt5 = "^5.15.1"
openpyxl = "^3.0.5"
cx-Freeze = "^6.4.1"

[tool.poetry.dev-dependencies]
black = "^20.8b1"
Expand Down
Empty file added qt/__init__.py
Empty file.
22 changes: 22 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import sys
from distutils.core import setup

from cx_Freeze import Executable, setup

# Dependencies are automatically detected, but it might need fine tuning.
# build_exe_options = {"packages": ["os"], "excludes": ["tkinter"]}
build_exe_options = {}

# GUI applications require a different base on Windows (the default is for a
# console application).
base = None
if sys.platform == "win32":
base = "Win32GUI"

setup(
name="Printer",
version="0.1",
description="Printtr",
options={"build_exe": build_exe_options},
executables=[Executable("print.py", base=base, icon='Icon.ico')],
)

0 comments on commit f1d70c3

Please sign in to comment.