8000 Merge pull request #1322 from dmcdougall/mac_build · matplotlib/matplotlib@58d8310 · GitHub
[go: up one dir, main page]

Skip to content

Commit 58d8310

Browse files
committed
Merge pull request #1322 from dmcdougall/mac_build
Update Mac build process. Fixes #751
2 parents 70e1b25 + 8662c32 commit 58d8310

13 files changed

+19
-482
lines changed
File renamed without changes.

make.osx

Lines changed: 0 additions & 117 deletions
This file was deleted.

setupext.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
basedir = defaultdict(lambda: ['/usr/local', '/usr'], {
5858
# execptions to the ['/usr/local', '/usr'] defaults
5959
'win32' : ['win32_static',],
60-
'darwin' : ['/usr/local/', '/usr', '/usr/X11'],
60+
'darwin' : ['/usr/local/', '/usr', '/usr/X11', '/opt/local'],
6161
'sunos5' : [os.getenv('MPLIB_BASE') or '/usr/local',],
6262
'gnu0' : ['/usr'],
6363
'aix5' : ['/usr/local'],
@@ -258,6 +258,20 @@ def get_win32_compiler():
258258
else:
259259
std_libs = ['stdc++', 'm']
260260

261+
def set_pkgconfig_path():
262+
pkgconfig_path = sysconfig.get_config_var('LIBDIR')
263+
if pkgconfig_path is None:
264+
return
265+
266+
pkgconfig_path = os.path.join(pkgconfig_path, 'pkgconfig')
267+
if not os.path.isdir(pkgconfig_path):
268+
return
269+
270+
try:
271+
os.environ['PKG_CONFIG_PATH'] += ':' + pkgconfig_path
272+
except KeyError:
273+
os.environ['PKG_CONFIG_PATH'] = pkgconfig_path
274+
261275
def has_pkgconfig():
262276
if has_pkgconfig.cache is not None:
263277
return has_pkgconfig.cache
@@ -267,6 +281,10 @@ def has_pkgconfig():
267281
#print 'environ', os.environ['PKG_CONFIG_PATH']
268282
status, output = getstatusoutput("pkg-config --help")
269283
has_pkgconfig.cache = (status == 0)
284+
285+
# Set the PKG_CONFIG_PATH environment variable
286+
if has_pkgconfig.cache:
287+
set_pkgconfig_path()
270288
return has_pkgconfig.cache
271289
has_pkgconfig.cache = None
272290

test/README.build_slaves

Lines changed: 0 additions & 10 deletions
This file was deleted.

test/README.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

test/_buildbot_doc.sh

Lines changed: 0 additions & 32 deletions
This file was deleted.

test/_buildbot_install.py

Lines changed: 0 additions & 37 deletions
This file was deleted.

test/_buildbot_mac_sage.sh

Lines changed: 0 additions & 23 deletions
This file was deleted.

test/_buildbot_test.py

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)
0