Skip to content

Commit

Permalink
Fix build on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
laggykiller committed Oct 1, 2023
1 parent d3a5624 commit bb8172b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
10 changes: 3 additions & 7 deletions compile.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
import os
import sys
import subprocess
import platform
import shutil
Expand Down Expand Up @@ -66,10 +67,7 @@ def create_universal_wheels(in_dir1, in_dir2, out_dir):
else:
use_shell = False

if shutil.which('python3'):
python_bin = 'python3'
else:
python_bin = 'python'
python_bin = os.path.abspath(sys.executable)

shutil.make_archive('src/sticker_convert/ios-message-stickers-template', 'zip', 'src/sticker_convert/ios-message-stickers-template')
shutil.rmtree('venv', ignore_errors=True)
Expand Down Expand Up @@ -124,9 +122,7 @@ def create_universal_wheels(in_dir1, in_dir2, out_dir):
os.rename(f_path, f_bak_path)
osx_run_in_venv(f'lipo {f_bak_path} {stub_x64} -create -output {f_path}', get_stdout=True)
print(f'Created fat library {f}')
else:
subprocess.run(f'{python_bin} -m venv venv'.split(' '), shell=use_shell)
subprocess.run(f'venv/Scripts/activate.bat'.split(' '), shell=use_shell)
elif platform.system() == 'Windows':
subprocess.run(f'{python_bin} -m pip install --upgrade pip'.split(' '), shell=use_shell)
subprocess.run(f'{python_bin} -m pip install -r requirements-build.txt'.split(' '), shell=use_shell)

Expand Down
11 changes: 8 additions & 3 deletions nuitka.config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
- module-name: 'rlottie_python'
- module-name: 'rlottie_python.rlottie_wrapper'
dlls:
# TODO: The "lib" difference out to be handled automatically.
- from_filenames:
prefixes:
- 'rlottie*'
- 'librlottie*'
- 'rlottie'
when: 'win32'
- from_filenames:
prefixes:
- 'librlottie'
when: 'not win32'

0 comments on commit bb8172b

Please sign in to comment.