Skip to content

Building PyGLM

Zuzu-Typ edited this page Jun 24, 2020 · 3 revisions

This page is intended for those, who want to build a specific subversion of PyGLM or want to specify different build options.
If that's not you, then you should find the latest release with binary distributions over here or over on PyPI.

Setting up the environment

In order to build PyGLM, you're going to need a working C++ development environment.  
Although compilation should work with any C++ compiler, the only ones officially supported are  

  • MSVC (Microsoft Visual C++) for Windows
      Click here to download the build tools
  • GCC (GNU Compiler Collection) mostly for Linux
      sudo apt install gcc (probably)
  • Clang default Mac OS X compiler
      Should already be installed.

That should be all there is to it.

Build options

If you want to change some build options or make a completely custom build, go ahead and clone PyGLM.

There are three different predefined build options that you can choose from inside of build_options.h.  
One of the lines should be  

#define PyGLM_BUILD PyGLM_DEFAULT

You can replace PyGLM_DEFAULT by one of the following options:  

  • PyGLM_FAST - No support for using iterables / buffers instead of PyGLM types  
  • PyGLM_NO_FUNCTIONS - Only build the types  
  • PYGLM_MINIMAL - Combines PyGLM_FAST and PyGLM_NO_FUNCTIONS

Another option PyGLM_SLIM was planned, which was supposed to only build the float types, to decrease the file size, though demand seems to be low.

Starting the build process

To build PyGLM, simply run  

python setup.py install

(you do need Python 3.5 or higher)

Clone this wiki locally