A Python package wrapping stormpci.h via PyBind11 for interfacing with StormPCI and reading binary files
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

44 lines
1.1 KiB

from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext
import sys
ext_modules = [
Extension(
'pbtest',
['py/main.cpp'],
include_dirs=['include'],
language='c++',
),
]
class BuildExt(build_ext):
"""A custom build extension for adding compiler-specific options."""
c_opts = {
'msvc': ['/EHsc'],
'unix': ['-std=c++11'],
}
if sys.platform == 'darwin':
c_opts['unix'] += ['-stdlib=libc++', '-mmacosx-version-min=10.7']
def build_extensions(self):
ct = self.compiler.compiler_type
opts = self.c_opts.get(ct, [])
for ext in self.extensions:
ext.extra_compile_args = opts
build_ext.build_extensions(self)
setup(
name='pbtest',
version='0.0.1',
author='Sylvain Corlay',
author_email='sylvain.corlay@gmail.com',
url='https://github.com/pybind/pbtest',
description='A test project using pybind11',
long_description='',
ext_modules=ext_modules,
install_requires=['pybind11'],
cmdclass={'build_ext': BuildExt},
zip_safe=False,
)