How to use the pybind11.__version__ function in pybind11

To help you get started, we’ve selected a few pybind11 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github GalSim-developers / GalSim / setup.py View on Github external
if os.path.isfile(os.path.join(fftw_include, 'fftw3.h')):
        print('Include directory for fftw3 is ',fftw_include)
        # Usually, the fftw3.h file is in an associated include dir, but not always.
        builder.include_dirs.append(fftw_include)
    else:
        # If not, we have our own copy of fftw3.h here.
        print('Using local copy of fftw3.h')
        builder.include_dirs.append('include/fftw3')

    # Look for Eigen/Core
    eigen_dir = find_eigen_dir(output=output)
    builder.include_dirs.append(eigen_dir)

    # Finally, add pybind11's include dir
    import pybind11
    print('PyBind11 is version ',pybind11.__version__)
    print('Looking for pybind11 header files: ')
    locations = [pybind11.get_include(user=True),
                 pybind11.get_include(user=False),
                 '/usr/include',
                 '/usr/local/include',
                 None]
    for try_dir in locations:
        if try_dir is None:
            # Last time through, raise an error.
            print("Could not find pybind11 header files.")
            print("They should have been in one of the following locations:")
            for l in locations:
                if l is not None:
                    print("   ", l)
            raise OSError("Could not find PyBind11")
github spirit-code / spirit / thirdparty / VFRendering / thirdparty / pybind11 / setup.py View on Github external
def run(self):
        if not self.distribution.headers:
            return

        for header in self.distribution.headers:
            subdir = os.path.dirname(os.path.relpath(header, 'include/pybind11'))
            install_dir = os.path.join(self.install_dir, subdir)
            self.mkpath(install_dir)

            (out, _) = self.copy_file(header, install_dir)
            self.outfiles.append(out)


setup(
    name='pybind11',
    version=__version__,
    description='Seamless operability between C++11 and Python',
    author='Wenzel Jakob',
    author_email='wenzel.jakob@epfl.ch',
    url='https://github.com/wjakob/pybind11',
    download_url='https://github.com/wjakob/pybind11/tarball/v' + __version__,
    packages=['pybind11'],
    license='BSD',
    headers=headers,
    cmdclass=dict(install_headers=InstallHeaders),
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Intended Audience :: Developers',
        'Topic :: Software Development :: Libraries :: Python Modules',
        'Topic :: Utilities',
        'Programming Language :: C++',
        'Programming Language :: Python :: 2.7',
github pybind / pybind11 / setup.py View on Github external
def build_package_data(self):
        build_py.build_package_data(self)
        for header in package_data:
            target = os.path.join(self.build_lib, 'pybind11', header)
            self.mkpath(os.path.dirname(target))
            self.copy_file(header, target, preserve_mode=False)


setup(
    name='pybind11',
    version=__version__,
    description='Seamless operability between C++11 and Python',
    author='Wenzel Jakob',
    author_email='wenzel.jakob@epfl.ch',
    url='https://github.com/pybind/pybind11',
    download_url='https://github.com/pybind/pybind11/tarball/v' + __version__,
    packages=['pybind11'],
    license='BSD',
    headers=headers,
    zip_safe=False,
    cmdclass=dict(install_headers=InstallHeaders, build_py=BuildPy),
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Intended Audience :: Developers',
        'Topic :: Software Development :: Libraries :: Python Modules',
        'Topic :: Utilities',
        'Programming Language :: C++',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
github hijkzzz / cuda-neural-network / third_parts / pybind11 / setup.py View on Github external
def run(self):
        if not self.distribution.headers:
            return

        for header in self.distribution.headers:
            subdir = os.path.dirname(os.path.relpath(header, 'include/pybind11'))
            install_dir = os.path.join(self.install_dir, subdir)
            self.mkpath(install_dir)

            (out, _) = self.copy_file(header, install_dir)
            self.outfiles.append(out)


setup(
    name='pybind11',
    version=__version__,
    description='Seamless operability between C++11 and Python',
    author='Wenzel Jakob',
    author_email='wenzel.jakob@epfl.ch',
    url='https://github.com/pybind/pybind11',
    download_url='https://github.com/pybind/pybind11/tarball/v' + __version__,
    packages=['pybind11'],
    license='BSD',
    headers=headers,
    cmdclass=dict(install_headers=InstallHeaders),
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Intended Audience :: Developers',
        'Topic :: Software Development :: Libraries :: Python Modules',
        'Topic :: Utilities',
        'Programming Language :: C++',
        'Programming Language :: Python :: 2.7',
github hijkzzz / cuda-neural-network / third_parts / pybind11 / setup.py View on Github external
subdir = os.path.dirname(os.path.relpath(header, 'include/pybind11'))
            install_dir = os.path.join(self.install_dir, subdir)
            self.mkpath(install_dir)

            (out, _) = self.copy_file(header, install_dir)
            self.outfiles.append(out)


setup(
    name='pybind11',
    version=__version__,
    description='Seamless operability between C++11 and Python',
    author='Wenzel Jakob',
    author_email='wenzel.jakob@epfl.ch',
    url='https://github.com/pybind/pybind11',
    download_url='https://github.com/pybind/pybind11/tarball/v' + __version__,
    packages=['pybind11'],
    license='BSD',
    headers=headers,
    cmdclass=dict(install_headers=InstallHeaders),
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Intended Audience :: Developers',
        'Topic :: Software Development :: Libraries :: Python Modules',
        'Topic :: Utilities',
        'Programming Language :: C++',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
github gem5 / gem5 / ext / pybind11 / setup.py View on Github external
'include/pybind11/eigen.h',
        'include/pybind11/eval.h',
        'include/pybind11/functional.h',
        'include/pybind11/numpy.h',
        'include/pybind11/operators.h',
        'include/pybind11/options.h',
        'include/pybind11/pybind11.h',
        'include/pybind11/pytypes.h',
        'include/pybind11/stl.h',
        'include/pybind11/stl_bind.h',
        'include/pybind11/typeid.h'
    ]

setup(
    name='pybind11',
    version=__version__,
    description='Seamless operability between C++11 and Python',
    author='Wenzel Jakob',
    author_email='wenzel.jakob@epfl.ch',
    url='https://github.com/wjakob/pybind11',
    download_url='https://github.com/wjakob/pybind11/tarball/v' + __version__,
    packages=['pybind11'],
    license='BSD',
    headers=headers,
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Intended Audience :: Developers',
        'Topic :: Software Development :: Libraries :: Python Modules',
        'Topic :: Utilities',
        'Programming Language :: C++',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
github molpopgen / fwdpy11 / setup.py View on Github external
from distutils.version import LooseVersion


if sys.version_info[0] < 3:
    raise ValueError("Python 3 is required!")

__version__ = '0.5.3'

if sys.version_info < (3, 3):
    raise RuntimeError("Python >= 3.3 required")

if pybind11.__version__ < '2.2.3':
    raise RuntimeError("pybind11 >= " + '2.2.3' + " required")

if sys.version_info >= (3, 7):
    if pybind11.__version__ < '2.3.0':
        raise RuntimeError(
            "Python 3.7 and newer required pybind11 2.3 or greater")


# clang/llvm is default for OS X builds.
# can over-ride darwin-specific options
# with setup.py --gcc install
if '--gcc' in sys.argv:
    USE_GCC = True
    sys.argv.remove('--gcc')
else:
    USE_GCC = False

if '--no-weffcpp' in sys.argv:
    USE_WEFFCPP = False
    sys.argv.remove('--no-weffcpp')
github gem5 / gem5 / ext / pybind11 / setup.py View on Github external
'include/pybind11/options.h',
        'include/pybind11/pybind11.h',
        'include/pybind11/pytypes.h',
        'include/pybind11/stl.h',
        'include/pybind11/stl_bind.h',
        'include/pybind11/typeid.h'
    ]

setup(
    name='pybind11',
    version=__version__,
    description='Seamless operability between C++11 and Python',
    author='Wenzel Jakob',
    author_email='wenzel.jakob@epfl.ch',
    url='https://github.com/wjakob/pybind11',
    download_url='https://github.com/wjakob/pybind11/tarball/v' + __version__,
    packages=['pybind11'],
    license='BSD',
    headers=headers,
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Intended Audience :: Developers',
        'Topic :: Software Development :: Libraries :: Python Modules',
        'Topic :: Utilities',
        'Programming Language :: C++',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
github spirit-code / spirit / thirdparty / VFRendering / thirdparty / pybind11 / setup.py View on Github external
subdir = os.path.dirname(os.path.relpath(header, 'include/pybind11'))
            install_dir = os.path.join(self.install_dir, subdir)
            self.mkpath(install_dir)

            (out, _) = self.copy_file(header, install_dir)
            self.outfiles.append(out)


setup(
    name='pybind11',
    version=__version__,
    description='Seamless operability between C++11 and Python',
    author='Wenzel Jakob',
    author_email='wenzel.jakob@epfl.ch',
    url='https://github.com/wjakob/pybind11',
    download_url='https://github.com/wjakob/pybind11/tarball/v' + __version__,
    packages=['pybind11'],
    license='BSD',
    headers=headers,
    cmdclass=dict(install_headers=InstallHeaders),
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Intended Audience :: Developers',
        'Topic :: Software Development :: Libraries :: Python Modules',
        'Topic :: Utilities',
        'Programming Language :: C++',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
github IntelRealSense / librealsense / wrappers / python / third_party / pybind11 / setup.py View on Github external
def run(self):
        if not self.distribution.headers:
            return

        for header in self.distribution.headers:
            subdir = os.path.dirname(os.path.relpath(header, 'include/pybind11'))
            install_dir = os.path.join(self.install_dir, subdir)
            self.mkpath(install_dir)

            (out, _) = self.copy_file(header, install_dir)
            self.outfiles.append(out)


setup(
    name='pybind11',
    version=__version__,
    description='Seamless operability between C++11 and Python',
    author='Wenzel Jakob',
    author_email='wenzel.jakob@epfl.ch',
    url='https://github.com/wjakob/pybind11',
    download_url='https://github.com/wjakob/pybind11/tarball/v' + __version__,
    packages=['pybind11'],
    license='BSD',
    headers=headers,
    cmdclass=dict(install_headers=InstallHeaders),
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Intended Audience :: Developers',
        'Topic :: Software Development :: Libraries :: Python Modules',
        'Topic :: Utilities',
        'Programming Language :: C++',
        'Programming Language :: Python :: 2.7',