-
Notifications
You must be signed in to change notification settings - Fork 446
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Test project.entry-points * Add 1st version of PyInstaller hooks * Package Fletd, custom host binding for Fletd * Remove pyinstaller dependency * Start Fletd without window on Windows
- Loading branch information
1 parent
3eed963
commit b7b9fb1
Showing
8 changed files
with
45 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import os | ||
|
||
|
||
def get_hook_dirs(): | ||
return [os.path.dirname(__file__)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import os | ||
|
||
# package entire "bin" folder | ||
bin_path = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, "bin")) | ||
|
||
# package "bin/fletd" only | ||
if os.getenv("PACKAGE_FLETD_ONLY"): | ||
bin_path = os.path.join(bin_path, "fletd*") | ||
|
||
# binaries = [(bin_path, "flet/bin")] | ||
binaries = [(bin_path, "flet/bin")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
'flet': [ | ||
'pyi_rth_localhost_fletd.py' | ||
], | ||
} |
6 changes: 6 additions & 0 deletions
6
sdk/python/flet/__pyinstaller/rthooks/pyi_rth_localhost_fletd.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import logging | ||
import os | ||
|
||
logging.info("Running PyInstaller runtime hook for Flet...") | ||
|
||
os.environ["FLET_SERVER_IP"] = "localhost" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters