diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2018-08-08 17:52:49 +1000 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2018-09-25 10:29:23 +1000 |
commit | 59327523d0d827ba7d8ff311ec89f0f32a1b2ebe (patch) | |
tree | 17f90ebe1a6d762ab59b346317d94e77ba20599d | |
parent | e84742aa7b934cd6603e3a64f8c0966f683c5711 (diff) | |
download | device-tree-compiler-59327523d0d827ba7d8ff311ec89f0f32a1b2ebe.tar.gz |
pylibfdt: We don't need include files from the base directory
pylibfdt/setup.py currently adds include flags to the extension module
build to allow include files in the base dtc directory. But pylibfdt
doesn't rely on any headers there, only on headers in libfdt/ - it also
shouldn't rely on dtc headers at any future time.
So, remove that from the include list, allowing some simplifications to
setup.py.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Simon Glass <sjg@chromium.org>
-rwxr-xr-x | pylibfdt/setup.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/pylibfdt/setup.py b/pylibfdt/setup.py index 1a1e832..8d97ab8 100755 --- a/pylibfdt/setup.py +++ b/pylibfdt/setup.py @@ -70,14 +70,12 @@ def GetEnvFromMakefiles(): Returns: Tuple with: - List of swig options Version string List of files to build List of extra C preprocessor flags needed Object directory to use (always '') """ basedir = os.path.dirname(os.path.dirname(os.path.abspath(sys.argv[0]))) - swig_opts = ['-I%s' % basedir] makevars = ParseMakefile(os.path.join(basedir, 'Makefile')) version = '%s.%s.%s' % (makevars['VERSION'], makevars['PATCHLEVEL'], makevars['SUBLEVEL']) @@ -85,9 +83,9 @@ def GetEnvFromMakefiles(): files = makevars['LIBFDT_SRCS'].split() files = [os.path.join(basedir, 'libfdt', fname) for fname in files] files.append('pylibfdt/libfdt.i') - cflags = ['-I%s' % basedir, '-I%s/libfdt' % basedir] + cflags = ['-I%s/libfdt' % basedir] objdir = '' - return swig_opts, version, files, cflags, objdir + return version, files, cflags, objdir progname = sys.argv[0] @@ -95,19 +93,17 @@ files = os.environ.get('SOURCES', '').split() cflags = os.environ.get('CPPFLAGS', '').split() objdir = os.environ.get('OBJDIR') version = os.environ.get('VERSION') -swig_opts = [] # If we were called directly rather than through our Makefile (which is often # the case with Python module installation), read the settings from the # Makefile. if not all((version, files, cflags, objdir)): - swig_opts, version, files, cflags, objdir = GetEnvFromMakefiles() + version, files, cflags, objdir = GetEnvFromMakefiles() libfdt_module = Extension( '_libfdt', sources = files, extra_compile_args = cflags, - swig_opts = swig_opts, ) setup( |