Improved the build flag construction code in the python install method.
This commit is contained in:
parent
fb2d2303d6
commit
ac2e0962ce
1 changed files with 7 additions and 27 deletions
|
@ -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):
|
||||||
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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue