Skip to content
Snippets Groups Projects
Commit ac2e0962 authored by Joseph Ciurej's avatar Joseph Ciurej
Browse files

Improved the build flag construction code in the python install method.

parent fb2d2303
No related branches found
No related tags found
No related merge requests found
...@@ -101,32 +101,13 @@ def install(self, spec, prefix): ...@@ -101,32 +101,13 @@ def install(self, spec, prefix):
# Rest of install is pretty standard except setup.py needs to # Rest of install is pretty standard except setup.py needs to
# be able to read the CPPFLAGS and LDFLAGS as it scans for the # be able to read the CPPFLAGS and LDFLAGS as it scans for the
# library and headers to build # library and headers to build
include_dirs = [ dep_pfxs = [dspec.prefix for dspec in spec.dependencies('link')]
spec['openssl'].prefix.include, spec['bzip2'].prefix.include,
spec['readline'].prefix.include, spec['ncurses'].prefix.include,
spec['sqlite'].prefix.include, spec['zlib'].prefix.include
]
library_dirs = [
spec['openssl'].prefix.lib, spec['bzip2'].prefix.lib,
spec['readline'].prefix.lib, spec['ncurses'].prefix.lib,
spec['sqlite'].prefix.lib, spec['zlib'].prefix.lib
]
if '+tk' in spec:
include_dirs.extend([
spec['tk'].prefix.include, spec['tcl'].prefix.include
])
library_dirs.extend([
spec['tk'].prefix.lib, spec['tcl'].prefix.lib
])
config_args = [ config_args = [
"--prefix={0}".format(prefix), '--prefix={0}'.format(prefix),
"--with-threads", '--with-threads',
"--enable-shared", '--enable-shared',
"CPPFLAGS=-I{0}".format(" -I".join(include_dirs)), 'CPPFLAGS=-I{0}'.format(' -I'.join(dp.include for dp in dep_pfxs)),
"LDFLAGS=-L{0}".format(" -L".join(library_dirs)) 'LDFLAGS=-L{0}'.format(' -L'.join(dp.lib for dp in dep_pfxs)),
] ]
if '+ucs4' in spec: if '+ucs4' in spec:
...@@ -142,9 +123,8 @@ def install(self, spec, prefix): ...@@ -142,9 +123,8 @@ def install(self, spec, prefix):
config_args.append('--without-ensurepip') config_args.append('--without-ensurepip')
configure(*config_args) configure(*config_args)
make() make()
make("install") make('install')
self.filter_compilers(spec, prefix) self.filter_compilers(spec, prefix)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment