Skip to content

Commit

Permalink
feat(bdist_dmg): more tests for coverage)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntindle authored and marcelotduarte committed Jul 9, 2024
1 parent 6c9f303 commit cf02ba4
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
21 changes: 21 additions & 0 deletions samples/dmg_layout/hello2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import sys
from datetime import datetime, timezone

today = datetime.now(tz=timezone.utc)
print("Hello from cx_Freeze")
print(f"The current date is {today:%B %d, %Y %H:%M:%S}\n")

print(f"Executable: {sys.executable}")
print(f"Prefix: {sys.prefix}")
print(f"Default encoding: {sys.getdefaultencoding()}")
print(f"File system encoding: {sys.getfilesystemencoding()}\n")

print("ARGUMENTS:")
for arg in sys.argv:
print(f"{arg}")
print()

print("PATH:")
for path in sys.path:
print(f"{path}")
print()
14 changes: 13 additions & 1 deletion samples/dmg_layout/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
# You can also specify an icon for the executable that will be reused for the dmg
# only the first executable is used for the icon
# icon="../../cx_Freeze/icons/python.icns" #noqa: ERA001
)
),
Executable(script="hello2.py"),
]

setup(
Expand All @@ -39,6 +40,17 @@
"show_path_bar": True,
"show_sidebar": True,
"sidebar_width": 150,
"silent": False,
"default_view": "icon-view",
"list_icon_size": 48,
"list_text_size": 12,
"list_scroll_position": (0, 0),
"list_columns": ["name", "size"],
"list_column_widths": {"name": 200, "size": 100},
"list_column_sort_directions": {
"name": "ascending",
"size": "ascending",
},
},
},
)

0 comments on commit cf02ba4

Please sign in to comment.