forked from logicmoo/vspace-metta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRebuild-hyperon.cmd
executable file
·63 lines (50 loc) · 1.29 KB
/
Rebuild-hyperon.cmd
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
@echo on
set OLDPATH=%CD%
cd /D "%~dp0"
set VSPACE=%CD%
SET HE=%VSPACE%\reqs\hyperon-experimental
SET PYPATH=%VSPACE%\env\Scripts
SET CARGOPATH=%HOMEDRIVE%%HOMEPATH%\.cargo\bin
SET PATH=%PYPATH%;%CARGOPATH%;%PATH%
call %PYPATH%\activate.bat
cd /D %HE%
echo Prepare environment
DIR %CARGOPATH%
%CARGOPATH%\rustup.exe update stable
python.exe -m pip install pip -U
%CARGOPATH%\cargo install --force cbindgen
%PYPATH%\pip install pyyaml
%PYPATH%\pip install conan==1.60.1
%PYPATH%\conan profile new --detect default
%PYPATH%\python.exe -m pip install pip==23.1.2
echo Build Hyperon library
cd /D %HE%\lib
%CARGOPATH%\cargo clean
%CARGOPATH%\cargo build
%CARGOPATH%\cargo test
%CARGOPATH%\cargo doc --no-deps
cd /D %HE%
echo Build C and Python API
#trash buil cd build
del /Q /S /F .\build
mkdir build
cd build
cmake ..
make -j4
make check
cd /D %HE%
echo Install python library and executables
%PYPATH%\pip install -v -e ./python[dev]
%PYPATH%\python.exe -m pip install ./python[dev]
echo Test
cd /D %HE%\python
%PYPATH%\pytest ./tests
cd /D %HE%
cd /D %HE%\repl
%CARGOPATH%\cargo doc --no-deps --features python
%CARGOPATH%\cargo install --path . --features python
cd /D %HE%
cd %VSPACE%
%PYPATH%\python.exe -m pip install --upgrade pip
%PYPATH%\python.exe -m pip install -r requirements.txt
cd /D %OLDPATH%