Commit 54e2ce01 authored by Michael Davidsaver's avatar Michael Davidsaver

example

parent 0a8ac378
......@@ -4,11 +4,17 @@ from setuptools_dso import DSO, Extension, setup
dso = DSO('dsodemo.lib.demo', ['src/foo.c', 'src/bar.cpp'],
define_macros = [('BUILD_FOO', None)],
# demonstrate passing other compiler flags, either conditionally or not.
# these are not actually used.
extra_compile_args = ['-DALL'],
lang_compile_args = {
'c':['-DISC'],
'c++':['-DISCXX'],
},
# demonstrate how to set an SONAME.
# eg. on linux the result will be two files:
# dsodemo/lib/libdemo.so
# dsodemo/lib/libdemo.so.1.0
soversion='1.0',
)
......
import sys, os
def fixpath():
path = os.environ.get('PATH', '').split(os.pathsep)
libdir = os.path.join(os.path.dirname(__file__), 'lib')
path.append(libdir)
os.environ['PATH'] = os.pathsep.join(path)
if hasattr(os, 'add_dll_directory'):
os.add_dll_directory(libdir)
if sys.platform == "win32":
fixpath()
from __future__ import print_function
import sys, os
def fixpath():
path = os.environ.get('PATH', '').split(os.pathsep)
libdir = os.path.join(os.path.dirname(__file__), 'lib')
path.append(libdir)
os.environ['PATH'] = os.pathsep.join(path)
if hasattr(os, 'add_dll_directory'):
os.add_dll_directory(libdir)
if sys.platform == "win32":
fixpath()
from .ext import dtest
if __name__=='__main__':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment