mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-30 19:11:37 +00:00
Now that this module has been accepted upstream we should stop using the local U-Boot one. In preparation for this, rename it to indicate it is for legacy use. Signed-off-by: Simon Glass <sjg@chromium.org>
38 lines
806 B
Python
38 lines
806 B
Python
#!/usr/bin/env python
|
|
|
|
"""
|
|
setup.py file for SWIG libfdt
|
|
"""
|
|
|
|
from distutils.core import setup, Extension
|
|
import os
|
|
import sys
|
|
|
|
# Don't cross-compile - always use the host compiler.
|
|
del os.environ['CROSS_COMPILE']
|
|
del os.environ['CC']
|
|
|
|
progname = sys.argv[0]
|
|
cflags = sys.argv[1]
|
|
files = sys.argv[2:]
|
|
|
|
if cflags:
|
|
cflags = [flag for flag in cflags.split(' ') if flag]
|
|
else:
|
|
cflags = None
|
|
|
|
libfdt_module = Extension(
|
|
'_libfdt_legacy',
|
|
sources = files,
|
|
extra_compile_args = cflags
|
|
)
|
|
|
|
sys.argv = [progname, '--quiet', 'build_ext', '--inplace', '--force']
|
|
|
|
setup (name = 'libfdt_legaacy',
|
|
version = '0.1',
|
|
author = "SWIG Docs",
|
|
description = """Simple swig libfdt from docs""",
|
|
ext_modules = [libfdt_module],
|
|
py_modules = ["libfdt_legacy"],
|
|
)
|