|
48 | 48 | assert len(archives) == 1
|
49 | 49 | shutil.unpack_archive(archives[0], "dist")
|
50 | 50 |
|
51 |
| - # build the one-file executable |
| 51 | + # build the portable |
52 | 52 | assert (
|
53 | 53 | subprocess.run(
|
54 | 54 | [
|
55 | 55 | "pyinstaller",
|
56 |
| - "--onefile", |
57 | 56 | "--add-data",
|
58 | 57 | f"dist/smpmgr-{version}:smpmgr",
|
59 |
| - "--copy-metadata", |
60 |
| - "smpmgr", |
| 58 | + "--copy-metadat=smpmgr", |
| 59 | + "--copy-metadata=readchar", |
61 | 60 | "--name=smpmgr",
|
62 |
| - "--collect-submodules", |
63 |
| - "shellingham", |
| 61 | + "--collect-submodules=shellingham", |
| 62 | + "--collect-submodules=readchar", |
| 63 | + "--hidden-import=readchar", |
64 | 64 | "smpmgr/__main__.py",
|
65 | 65 | ]
|
66 | 66 | ).returncode
|
|
70 | 70 | # run the executable and check the version
|
71 | 71 | assert (
|
72 | 72 | f"Version {version}"
|
73 |
| - in subprocess.run(["dist/smpmgr", "--help"], capture_output=True).stdout.decode() |
| 73 | + in subprocess.run(["dist/smpmgr/smpmgr", "--help"], capture_output=True).stdout.decode() |
74 | 74 | )
|
75 | 75 |
|
76 | 76 | # create the folder
|
|
80 | 80 | os.makedirs(dist_path, exist_ok=True)
|
81 | 81 |
|
82 | 82 | # copy the executable to the folder
|
83 |
| - shutil.copy(Path("dist", exe_name), Path(dist_path, exe_name)) |
| 83 | + shutil.copytree(Path("dist", "smpmgr"), Path(dist_path), dirs_exist_ok=True) |
84 | 84 |
|
85 | 85 | # create a VERSION.txt stamp
|
86 | 86 | with open(Path(dist_path, "VERSION.txt"), "w") as f:
|
|
0 commit comments