Skip to content

Commit a78ed5f

Browse files
committed
Build - windows: add
1 parent 4300b25 commit a78ed5f

4 files changed

Lines changed: 26 additions & 11 deletions

File tree

build-system/luxmake/__main__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from .build import build_and_install, install
1818
from .wheel import make_wheel
1919
from .clear import clean, clear
20+
from .windows import win_recompose
2021

2122

2223
def main():
@@ -64,6 +65,11 @@ def main():
6465
parser_wheel = subparsers.add_parser("wheel-test")
6566
parser_wheel.set_defaults(func=make_wheel)
6667

68+
# Win wheel recomposing
69+
parser_wheel = subparsers.add_parser("win-recompose")
70+
parser_build_and_install.add_argument("wheel")
71+
parser_wheel.set_defaults(func=win_recompose)
72+
6773
# Clear
6874
parser_clear = subparsers.add_parser("clear")
6975
parser_clear.set_defaults(func=clear)

build-system/luxmake/wheel.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,4 +150,5 @@ def make_wheel(args):
150150

151151
# And, for Windows, recompose
152152
if platform.system() == "Windows":
153-
recompose(WHEELHOUSE_DIR / wheelname)
153+
args.wheel = WHEELHOUSE_DIR / wheelname
154+
win_recompose(args)

build-system/luxmake/windows.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
from .utils import pack, unpack, logger
2020

2121

22-
def recompose(wheel_path):
22+
def win_recompose(args):
2323
"""Recompose Windows wheel (see module docstring)."""
24+
wheel_path = Path(args.wheel)
2425
wheel_folder = wheel_path.parents[0]
2526

2627
logger.info("Recomposing '%s'", wheel_path)

make.bat

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ if "%LUX_PYTHON%" == "" (
1515
set LUX_PYTHON=python
1616
)
1717

18-
set LUX_CMAKE="%LUX_PYTHON%" -u -m build-system.luxmake
18+
set LUXMAKE="%LUX_PYTHON%" -u -m build-system.luxmake
1919

2020
if "%COMMAND%" == "" (
2121
call :Config
@@ -53,6 +53,8 @@ if "%COMMAND%" == "" (
5353
call :Clear
5454
) else if "%COMMAND%" == "deps" (
5555
call :Deps
56+
) else if "%COMMAND%" == "win-recompose" (
57+
call :WinRecompose %2
5658
) else if "%COMMAND%" == "list-presets" (
5759
call :ListPresets
5860
) else (
@@ -61,36 +63,41 @@ if "%COMMAND%" == "" (
6163
exit /B
6264

6365
:Deps
64-
call %LUX_CMAKE% deps
66+
call %LUXMAKE% deps
6567
goto :EOF
6668

6769
:ListPresets
68-
call %LUX_CMAKE% list-presets
70+
call %LUXMAKE% list-presets
6971
goto :EOF
7072

7173
:Config
72-
call %LUX_CMAKE% config
74+
call %LUXMAKE% config
7375
goto :EOF
7476

7577
:BuildAndInstall
76-
call %LUX_CMAKE% build-and-install %1
78+
call %LUXMAKE% build-and-install %1
7779
goto :EOF
7880

7981
:Install
8082
IF "%~1" == "" (
81-
%LUX_CMAKE% all
83+
%LUXMAKE% all
8284
) else (
83-
%LUX_CMAKE% %1
85+
%LUXMAKE% %1
8486
)
8587
goto :EOF
8688

89+
:WinRecompose
90+
REM Exists only in windows make
91+
call %LUXMAKE% win-recompose %1
92+
goto :EOF
93+
8794
:Clean
88-
call %LUX_CMAKE% clean
95+
call %LUXMAKE% clean
8996
goto :EOF
9097

9198
:Clear
9299
REM rmdir /S /Q
93-
call %LUX_CMAKE% clear
100+
call %LUXMAKE% clear
94101
goto :EOF
95102

96103
:EOF

0 commit comments

Comments
 (0)