#A helper script for testing with PyPy. Instead of
#'import d3d11' do 'from d3d11_pypy import *'
import sys
import os
try:
import cpyext
except ImportError:
cpyext = None
if cpyext is None:
#Probably not a PyPy interpreter.
import d3d11
else:
#Probably running on PyPy, load the main module (d3d11).
#This assumes that it is in the same directory as this module
#and uses __file__, which is not always available.
modDir = os.path.dirname(__file__)
cpyext.load_module(os.path.join(modDir, "d3d11.pyd"), "d3d11")
d3d11 = sys.modules["d3d11"]