else: if os.path.exists(os.path.join('..', '..', 'CMakeLists.txt')): # Good working directory CProot = os.path.join('..', '..') else: raise ValueError('Could not run script from this folder(' + os.path.abspath(os.path.curdir) + '). Run from wrappers/Python folder') sys.path.append(os.path.join(CProot, 'dev')) if not USING_CMAKE: import generate_headers # Generate the headers - does nothing if up to date - but only if not pypi generate_headers.generate() del generate_headers import generate_constants_module generate_constants_module.generate() del generate_constants_module # Read the version from a bare string stored in file in root directory version = open(os.path.join(CProot, '.version'), 'r').read().strip() setup_kwargs = { 'zip_safe': False # no compressed egg; see http://stackoverflow.com/a/29124937/1360263 } from setuptools import setup, Extension, find_packages def get_shared_ptr_setter(base_class): """ Get the setter class with the appropriate base class """
else: if os.path.exists(os.path.join('..','..','CMakeLists.txt')): # Good working directory CProot = os.path.join('..','..') else: raise ValueError('Could not run script from this folder(' + os.path.abspath(os.path.curdir) + '). Run from wrappers/Python folder') sys.path.append(os.path.join(CProot, 'dev')) if not USING_CMAKE: import generate_headers # Generate the headers - does nothing if up to date - but only if not pypi generate_headers.generate() del generate_headers import generate_constants_module generate_constants_module.generate() del generate_constants_module # Read the version from a bare string stored in file in root directory version = open(os.path.join(CProot,'.version'),'r').read().strip() setup_kwargs = {} from setuptools import setup, Extension, find_packages if USE_CYTHON: import Cython.Compiler from Cython.Distutils.extension import Extension from Cython.Build import cythonize from Cython.Distutils import build_ext # This will always generate HTML to show where there are still pythonic bits hiding out Cython.Compiler.Options.annotate = True