Skip to content

Commit

Permalink
fixed pyinstaller github action
Browse files Browse the repository at this point in the history
  • Loading branch information
davidvanzessen committed Nov 21, 2023
1 parent 5952c7b commit a370925
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pyinstaller-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
run: pip install -r requirements\requirements.txt

- name: PyInstaller
run: pyinstaller --clean --name molclass --onefile main.py
run: pyinstaller --clean molclass.spec

- name: List contents of dist directory
run: ls dist
Expand Down
5 changes: 4 additions & 1 deletion molclass.spec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ a = Analysis(
['main.py'],
pathex=[],
binaries=[],
datas=[],
datas=[
("static", "./static"),
("templates", "./templates"),
],
hiddenimports=[],
hookspath=[],
hooksconfig={},
Expand Down
4 changes: 3 additions & 1 deletion templates/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from fastapi.templating import Jinja2Templates

templates = Jinja2Templates(directory="templates")
from util import relative_path

templates = Jinja2Templates(directory=relative_path("templates"))

0 comments on commit a370925

Please sign in to comment.