1. Requirements
-
Python 3.9+
-
C compiler:
-
On macOS: Xcode command line tools
-
On Linux:
gccandbuild-essential -
On Windows: MSVC (Visual Studio 2022 or later)
-
You can first build Python from source if you want.
2. Prepare
2.1. Virtual Environment (optional but recommended)
python3 -m venv vgxenv
. vgxenv/bin/activate
python -m venv vgxenv
call vgxenv\Scripts\activate.bat
2.2. Tools
pip install setuptools build wheel
3. Build PyVGX
3.1. Get source code and check out target branch
git clone https://github.com/slysne/vgxserver.git
cd vgxserver
git checkout v3.6
3.2. Build
./build-unix.sh --version 3.6 --type release
build-win64.cmd 3.6 release
This will build and install the pyvgx package. (You can find the build output wheel in vgxserver/../build-pyvgx/dist.)
4. Test
First create a working directory somewhere and cd into it. Then you can run one or more of the following basic tests to verify your build.
4.1. Verify PyVGX Installed
This will print some information and exit.
python -c "import pyvgx"
4.2. Demo Service
Start the demo service to verify all internal communication works.
| This will use ~16GB of RAM |
vgxdemoservice multi
# ... service will start, admin page will load in a browser
vgxdemoservice stop
4.3. Run Test Suite
You can run the pyvgx test suite by following these steps:
-
Copy
vgxserver/testto your working directory -
Run
python test_pyvgx.py
# Assume WORKING is your temporary test directory
# E.g. WORKING=~/working
# Start in cloned repo:
cd vgxserver
cp -r pyvgx/test $WORKING/test
cd $WORKING/test
python test_pyvgx.py
rem Assume WORKING is your temporary test directory
rem E.g. set WORKING=C:%HOMEPATH%\working
rem Start in cloned repo:
cd vgxserver
xcopy /E /I /Q /Y pyvgx\test %WORKING%\test
cd /D %WORKING%/test
python test_pyvgx.py
|
You can run a smaller subset of quick tests like this:
You can also run tests for specific components or sub-modules:
|
