Find Blender sources in version control, create build scripts
Project description
bpy-build
Python build script for Blender as a python module
It needs to be its own repository to satisfy the install_requires
of blenderpy
Note
While it is possible to install this module standalone, you will probably get better results installing blenderpy
via pip install bpy
rather than installing pip install bpy-build
, as pip install bpy
will attempt to take care of making sure the bpy
installation is good.
Option 1 - Get prebuilt bdist_wheel from pypi
Prerequisites
- A supported python installation with pip installed
Installation
py -m pip install bpy-build
Option 2 - Build from sources using pypi
Prerequisites
- Windows users must have Visual Studio 2013 or later and C++ build tools installed to build from sources
- ALL users must have an SVN command-line provider to build from sources (see https://stackoverflow.com/questions/1625406/using-tortoisesvn-via-the-command-line) (this is a requirement as it is how we determine the correct release tag to grab, if any)
- All users must
py -m pip install cmake
in their python environment to build from sources (currently adding it as asetup_requires
does not install it properly); after build it may be uninstalled withpy -m pip uninstall cmake
- Users of Python versions below 3.6 must have
future-fstrings
installedpip install -U future-fstrings
- Users of Python versions 3.4 and below will probably need to update
setuptools
pip install -U setuptools
- Up-to-date
wheel
Installation
py -m pip install bpy-build --no-binary
How it works
- Create overriding classes CMakeExtension & BuildCMake, which inheirit from the setuptools classes; bpy is a python extension (.pyd) and an instance of CMakeExtension, BuildCMake is the command that is run when installing the extension from pip (or running setup.py)
- Using GitPython, clone Blender sources from https://git.blender.org/
- If on Windows, detect the installed version of Visual Studio and 64bit vs 32bit, and download the appropriate svn library based on that
- Using cmake, configure blender as a python module https://wiki.blender.org/wiki/Building_Blender/Other/BlenderAsPyModule; configure this build solution in the build_temp directory of the bpy package
- Using cmake, build the configured solution
- Place the built binaries in the built extension parent directory (important!)
- Relocate the / directory (i.e: /2.79) into the directory containing the executable from which this installation was spawned (where 'python.exe' is)
- Clean up using the remaining functionality from the superclasses
build_ext
andExtension
- bpy.pyd/ .so should now be installed into the site-packages
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bpy-build-1.0.1.tar.gz
(7.8 kB
view hashes)
Built Distribution
bpy_build-1.0.1-py3-none-any.whl
(21.1 kB
view hashes)
Close
Hashes for bpy_build-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e1dbf3a1d5d983475be346d40321522fe06b2f82f1a4254b3c455e95c5872e1 |
|
MD5 | c1130e58ec17bc63702d7f5ebee16033 |
|
BLAKE2b-256 | 51872ec99ee15a62227bbc59acb17a8be773489a0ff0080815e0ce4b5f67152a |