-
Notifications
You must be signed in to change notification settings - Fork 25
/
manage.bat
35 lines (32 loc) · 951 Bytes
/
manage.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
@echo off
REM build, wheel, testwheel
set arg=%1
REM Building the C library
IF "%arg%"=="build" (
if not exist "build" mkdir build
cd build
cmake .. -G "MinGW Makefiles"
mingw32-make
cd ..
)
REM Building the Cython module and the wheel
IF "%arg%"=="wheel" (
cd bindings\cython
python setup.py build_ext -i -c mingw32
python setup.py develop
python setup.py sdist bdist_wheel
cd ..\..
)
REM Testing the wheel in a virtual env
IF "%arg%"=="testwheel" (
if not exist "bindings\cython\dist" mkdir bindings\cython\dist
cd bindings\cython\dist
rmdir /s /q venv
python -m venv venv
venv\Scripts\python -m pip install --upgrade pip
REM venv\Scripts\pip install datoviz*.whl
REM Find the whl package and install it
for /r %%f in (datoviz*.whl) do venv\Scripts\pip install "%%f"
venv\Scripts\python -c "from datoviz import canvas, run; canvas().gui_demo(); run()"
cd ..\..\..
)