Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0ce7fba

Browse files
committed
Amend, rather than override, CFLAGS
1 parent b1c921a commit 0ce7fba

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

setupext.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,13 +1021,16 @@ def do_custom_build(self):
10211021
raise IOError("{0} does not match expected hash.".format(tarball))
10221022

10231023
print("Building {0}".format(tarball))
1024+
cflags = 'CFLAGS="{0} -fPIC" '.format(os.environ.get('CFLAGS', ''))
1025+
10241026
subprocess.check_call(
10251027
['tar zxf {0}'.format(tarball)], shell=True, cwd='build')
10261028
subprocess.check_call(
1027-
['CFLAGS=-fPIC ./configure --without-zlib --without-bzip2 --without-png'],
1029+
[cflags +
1030+
'./configure --without-zlib --without-bzip2 --without-png'],
10281031
shell=True, cwd=src_path)
10291032
subprocess.check_call(
1030-
['CFLAGS=-fPIC make'], shell=True, cwd=src_path)
1033+
[cflags + 'make'], shell=True, cwd=src_path)
10311034

10321035

10331036
class FT2Font(SetupPackage):

0 commit comments

Comments
 (0)