|
|
@ -21,21 +21,22 @@ def get_version(): |
|
|
|
m = re.match(VERSION_PATTERN, f.readline()) |
|
|
|
m = re.match(VERSION_PATTERN, f.readline()) |
|
|
|
return m.group(1) |
|
|
|
return m.group(1) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setupdir = os.path.dirname(os.path.abspath(sys.argv[0])) |
|
|
|
setupdir = os.path.dirname(os.path.abspath(sys.argv[0])) |
|
|
|
os.chdir(setupdir) |
|
|
|
os.chdir(setupdir) |
|
|
|
|
|
|
|
|
|
|
|
libfdt_module = Extension( |
|
|
|
libfdt_module = Extension( |
|
|
|
'_libfdt', |
|
|
|
'_libfdt', |
|
|
|
sources = ['libfdt.i'], |
|
|
|
sources=['libfdt.i'], |
|
|
|
include_dirs = ['../libfdt'], |
|
|
|
include_dirs=['../libfdt'], |
|
|
|
libraries = ['fdt'], |
|
|
|
libraries=['fdt'], |
|
|
|
library_dirs = ['../libfdt'], |
|
|
|
library_dirs=['../libfdt'], |
|
|
|
swig_opts = ['-I../libfdt'], |
|
|
|
swig_opts=['-I../libfdt'], |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
setup( |
|
|
|
setup( |
|
|
|
name='libfdt', |
|
|
|
name='libfdt', |
|
|
|
version= get_version(), |
|
|
|
version=get_version(), |
|
|
|
author='Simon Glass <sjg@chromium.org>', |
|
|
|
author='Simon Glass <sjg@chromium.org>', |
|
|
|
description='Python binding for libfdt', |
|
|
|
description='Python binding for libfdt', |
|
|
|
ext_modules=[libfdt_module], |
|
|
|
ext_modules=[libfdt_module], |
|
|
|