Skip to content
This repository was archived by the owner on Mar 31, 2025. It is now read-only.

Commit 54b24d0

Browse files
Modified build process
1 parent d715ee4 commit 54b24d0

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

setup.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
import platform
2+
import sysconfig
13
from cx_Freeze import setup, Executable # type: ignore
4+
from shutil import make_archive
25
import mathscript
36
import subprocess
47

@@ -36,11 +39,13 @@
3639
Executable('shell.py', base=base, target_name = mathscript.product_name.lower())
3740
]
3841

39-
setup(name=mathscript.product_name,
40-
version = mathscript.version_str,
41-
description = mathscript.product_description,
42-
options = {'build_exe': build_options},
43-
executables = executables)
44-
45-
with open('shell.py', 'w') as f:
46-
f.write(original_content)
42+
try:
43+
setup(name=mathscript.product_name,
44+
version = mathscript.version_str,
45+
description = mathscript.product_description,
46+
options = {'build_exe': build_options},
47+
executables = executables)
48+
make_archive(f'dist/{mathscript.product_name.lower()}_{platform.system().lower().replace('darwin', 'macos')}', 'zip', f'dist/exe.{sysconfig.get_platform()}-{sysconfig.get_python_version()}')
49+
finally:
50+
with open('shell.py', 'w') as f:
51+
f.write(original_content)

shell.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
git_release_tag = 'v1.0.0-17-ga308989'
2-
git_commit_hash = 'a308989'
3-
git_commit_date = 'Aug 9 2024, 17:55:15'
1+
git_release_tag = 'latest'
2+
git_commit_hash = 'latest'
3+
git_commit_date = None
44

55
import platform
66
import mathscript

0 commit comments

Comments
 (0)