[Commits] (vajda) added dynamic computing and setting of -F flag for non-standard installation location of Chandler's Python.framework

commits at osafoundation.org commits at osafoundation.org
Tue Mar 16 15:07:29 PST 2004


Commit by: vajda
Modified files:
external/python/Makefile 1.8 1.9
external/python/patches 1.1 1.2

Log message:
added dynamic computing and setting of -F flag for non-standard installation location of Chandler's Python.framework


ViewCVS links:
http://cvs.osafoundation.org/index.cgi/external/python/Makefile.diff?r1=text&tr1=1.8&r2=text&tr2=1.9
http://cvs.osafoundation.org/index.cgi/external/python/patches.diff?r1=text&tr1=1.1&r2=text&tr2=1.2

Index: external/python/Makefile
diff -u external/python/Makefile:1.8 external/python/Makefile:1.9
--- external/python/Makefile:1.8	Tue Mar 16 13:57:57 2004
+++ external/python/Makefile	Tue Mar 16 15:06:57 2004
@@ -31,8 +31,7 @@
 $(SRC)/$(BUILD)/Makefile:
 	cd $(SRC); mkdir -p $(BUILD); cd $(BUILD); \
 	../configure --prefix=$(PREFIX) $(CONF_DBG) \
-                     --enable-framework=$(PREFIX)/Library/Frameworks \
-                     LDFLAGS=-F$(PREFIX)/Library/Frameworks
+                     --enable-framework=$(PREFIX)/Library/Frameworks
 
 build: apply
 	cd $(SRC)/$(BUILD); \

Index: external/python/patches
diff -u external/python/patches:1.1 external/python/patches:1.2
--- external/python/patches:1.1	Mon Mar 15 12:35:34 2004
+++ external/python/patches	Tue Mar 16 15:06:57 2004
@@ -45,3 +45,25 @@
  	/* We only use the default relative PYTHONPATH if we havent
  	   anything better to use! */
  	skipdefault = envpath!=NULL || pythonhome!=NULL || \
+--- Python-2.3.3/Lib/distutils/sysconfig.py	Mon Feb 10 06:02:33 2003
++++ Python-2.3.3-patched/Lib/distutils/sysconfig.py	Tue Mar 16 14:39:57 2004
+@@ -149,6 +149,19 @@
+         (cc, cxx, opt, basecflags, ccshared, ldshared, so_ext) = \
+             get_config_vars('CC', 'CXX', 'OPT', 'BASECFLAGS', 'CCSHARED', 'LDSHARED', 'SO')
+ 
++        # Chandler: add the -F flag needed to compile to installed Framework
++        if ldshared.endswith('-framework Python'):
++            site = None
++            for path in sys.path:
++                if path.endswith('site-packages'):
++                    site = path
++                    break
++            if site is not None:
++                pos = site.find('Library/Frameworks')
++                if pos > 0:
++                    ldshared = "%s -F%s -framework Python" %(ldshared[:-18],
++                                                             site[0:pos+18])
++        
+         if os.environ.has_key('CC'):
+             cc = os.environ['CC']
+         if os.environ.has_key('CXX'):



More information about the Commits mailing list