-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build macOS universal2 and arm64 package
- Loading branch information
1 parent
b19285c
commit aac2c27
Showing
9 changed files
with
108 additions
and
31 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
apngasm_python~=1.0.7 | ||
av~=10.0.0 | ||
beautifulsoup4~=4.12.2 | ||
browser-cookie3~=0.19.1 | ||
imageio~=2.31.3 | ||
memory-tempfile~=2.2.3 | ||
mergedeep~=1.3.4 | ||
Pillow~=10.0.0 | ||
pyoxipng~=8.0.0 | ||
python-telegram-bot~=20.5 | ||
requests~=2.31.0 | ||
rlottie_python~=1.1.5 | ||
selenium~=4.12.0 | ||
signalstickers-client~=3.3.0 | ||
tqdm~=4.66.1 | ||
ttkbootstrap-fork-laggykiller~=1.5.1 | ||
webp~=0.2.0 |
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 @@ | ||
lottie~=0.7.0 |
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 |
---|---|---|
@@ -1,18 +1,2 @@ | ||
apngasm_python~=1.0.4 | ||
av~=10.0.0 | ||
beautifulsoup4~=4.12.2 | ||
browser-cookie3~=0.19.1 | ||
imageio~=2.31.3 | ||
lottie~=0.7.0 | ||
memory-tempfile~=2.2.3 | ||
mergedeep~=1.3.4 | ||
Pillow~=10.0.0 | ||
pyoxipng~=8.0.0 | ||
python-telegram-bot~=20.5 | ||
requests~=2.31.0 | ||
rlottie_python~=1.1.4 | ||
selenium~=4.12.0 | ||
signalstickers-client~=3.3.0 | ||
tqdm~=4.66.1 | ||
ttkbootstrap-fork-laggykiller~=1.5.1 | ||
webp~=0.1.8 | ||
-r requirements-src.txt | ||
-r requirements-bin.txt |
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,44 @@ | ||
#!/usr/bin/env python3 | ||
# A script for creating universal2 wheels from x86_64 and arm64 wheels | ||
# Used for creating macOS application | ||
|
||
import sys | ||
import os | ||
import shutil | ||
import subprocess | ||
|
||
in_dir1 = sys.argv[1] | ||
in_dir2 = sys.argv[2] | ||
out_dir = sys.argv[3] | ||
|
||
def search_wheel_in_dir(package, dir): | ||
for i in os.listdir(dir): | ||
if i.startswith(package): | ||
return i | ||
|
||
def copy_if_universal(wheel_name, in_dir, out_dir): | ||
if wheel_name.endswith('universal2.whl') or wheel_name.endswith('any.whl'): | ||
src_path = os.path.join(in_dir, wheel_name) | ||
dst_path = os.path.join( | ||
out_dir, | ||
wheel_name | ||
.replace('x86_64', 'universal2') | ||
.replace('arm64', 'universal2') | ||
) | ||
|
||
shutil.copy(src_path, dst_path) | ||
return True | ||
else: | ||
return False | ||
|
||
for wheel_name_1 in os.listdir(in_dir1): | ||
package = wheel_name_1.split('-')[0] | ||
wheel_name_2 = search_wheel_in_dir(package, in_dir2) | ||
if copy_if_universal(wheel_name_1, in_dir1, out_dir): | ||
continue | ||
if copy_if_universal(wheel_name_2, in_dir2, out_dir): | ||
continue | ||
|
||
wheel_path_1 = os.path.join(in_dir1, wheel_name_1) | ||
wheel_path_2 = os.path.join(in_dir2, wheel_name_2) | ||
subprocess.run(['delocate-fuse', wheel_path_1, wheel_path_2, '-w', out_dir]) |
File renamed without changes.
File renamed without changes.
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