Skip to content

Commit

Permalink
fixing the issue with pyinstaller on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
sentenzo authored Sep 13, 2022
1 parent 8d1eae1 commit 491df7c
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@

# https://stackoverflow.com/a/4511164/2493536
ifdef OS # Windows
RM = del /Q /S #Remove-Item -Recurse -Force -LiteralPath
FixPath = $(subst /,\,$1)
PYTHON = python
EXT = .exe
PATH_ARG_SEP=;
else
ifeq ($(shell uname), Linux) # Linux
RM = rm -rf
FixPath = $1
PYTHON = python3.10
PATH_ARG_SEP=:
endif
endif

Expand All @@ -32,7 +29,7 @@ build: pyui
--onefile \
--name $(PACKAGE_NAME) \
--icon ../$(PACKAGE_NAME)/rec/ico/file-video.ico \
--add-data ../$(PACKAGE_NAME)/rec/ico/*;./$(PACKAGE_NAME)/rec/ico \
--add-data ../$(PACKAGE_NAME)/rec/ico/*$(PATH_ARG_SEP)./$(PACKAGE_NAME)/rec/ico \
$(PACKAGE_NAME)/__main__.py

run:
Expand All @@ -41,12 +38,8 @@ run:
runpy: pyui
poetry run python -m $(PACKAGE_NAME)

clean:
$(RM) $(call FixPath,./bin/*)
$(RM) $(call FixPath,./.pyinstaller/*)

test: pyui
poetry run python -m pytest -m "not slow" --verbosity=2 --showlocals --log-level=DEBUG

test-full: pyui
poetry run python -m pytest --verbosity=2 --showlocals --log-level=DEBUG
poetry run python -m pytest --verbosity=2 --showlocals --log-level=DEBUG

0 comments on commit 491df7c

Please sign in to comment.