[40887] trunk/dports/lang/python26
blb at macports.org
blb at macports.org
Thu Oct 16 23:48:00 PDT 2008
Revision: 40887
http://trac.macports.org/changeset/40887
Author: blb at macports.org
Date: 2008-10-16 23:47:59 -0700 (Thu, 16 Oct 2008)
Log Message:
-----------
lang/python26 - Add a no-user-cfg option to distutils to ignore a user's
pydistutils.cfg; ticket #9831, for 2.5
(patch 5 from #16765)
Modified Paths:
--------------
trunk/dports/lang/python26/Portfile
trunk/dports/lang/python26/files/patch-Makefile.pre.in.diff
Added Paths:
-----------
trunk/dports/lang/python26/files/patch-Lib-distutils-dist.py.diff
Modified: trunk/dports/lang/python26/Portfile
===================================================================
--- trunk/dports/lang/python26/Portfile 2008-10-17 06:41:01 UTC (rev 40886)
+++ trunk/dports/lang/python26/Portfile 2008-10-17 06:47:59 UTC (rev 40887)
@@ -36,8 +36,12 @@
set frameworks_dir ${prefix}/Library/Frameworks
}
-patchfiles patch-setup.py.diff \
+# patch-Lib-distutils-dist.py.diff comes from
+# <http://bugs.python.org/issue1180>
+patchfiles patch-Makefile.pre.in.diff \
+ patch-setup.py.diff \
patch-Lib-cgi.py.diff \
+ patch-Lib-distutils-dist.py.diff \
patch-Mac-IDLE-Makefile.in.diff \
patch-Mac-Makefile.in.diff \
patch-Mac-PythonLauncher-Makefile.in.diff \
Added: trunk/dports/lang/python26/files/patch-Lib-distutils-dist.py.diff
===================================================================
--- trunk/dports/lang/python26/files/patch-Lib-distutils-dist.py.diff (rev 0)
+++ trunk/dports/lang/python26/files/patch-Lib-distutils-dist.py.diff 2008-10-17 06:47:59 UTC (rev 40887)
@@ -0,0 +1,51 @@
+--- Lib/distutils/dist.py.orig 2008-09-03 05:13:56.000000000 -0600
++++ Lib/distutils/dist.py 2008-10-03 18:33:47.000000000 -0600
+@@ -60,6 +60,7 @@
+ ('quiet', 'q', "run quietly (turns verbosity off)"),
+ ('dry-run', 'n', "don't actually do anything"),
+ ('help', 'h', "show detailed help message"),
++ ('no-user-cfg', None,'ignore pydistutils.cfg in your home directory'),
+ ]
+
+ # 'common_usage' is a short (2-3 line) string describing the common
+@@ -267,6 +268,12 @@
+ else:
+ sys.stderr.write(msg + "\n")
+
++ # no-user-cfg is handled before other command line args
++ # because other args override the config files, and this
++ # one is needed before we can load the config files.
++ # If attrs['script_args'] wasn't passed, assume false.
++ self.want_user_cfg = '--no-user-cfg' not in (self.script_args or [])
++
+ self.finalize_options()
+
+ # __init__ ()
+@@ -327,6 +334,9 @@
+ Distutils __inst__.py file lives), a file in the user's home
+ directory named .pydistutils.cfg on Unix and pydistutils.cfg
+ on Windows/Mac, and setup.cfg in the current directory.
++
++ The file in the user's home directory can be disabled with the
++ --no-user-cfg option.
+ """
+ files = []
+ check_environ()
+@@ -347,7 +357,7 @@
+
+ # And look for the user config file
+ user_file = os.path.join(os.path.expanduser('~'), user_filename)
+- if os.path.isfile(user_file):
++ if self.want_user_cfg and os.path.isfile(user_file):
+ files.append(user_file)
+
+ # All platforms support local setup.cfg
+@@ -355,6 +365,8 @@
+ if os.path.isfile(local_file):
+ files.append(local_file)
+
++ if DEBUG:
++ print "using config files: %s" % ', '.join(files)
+ return files
+
+ # find_config_files ()
Modified: trunk/dports/lang/python26/files/patch-Makefile.pre.in.diff
===================================================================
--- trunk/dports/lang/python26/files/patch-Makefile.pre.in.diff 2008-10-17 06:41:01 UTC (rev 40886)
+++ trunk/dports/lang/python26/files/patch-Makefile.pre.in.diff 2008-10-17 06:47:59 UTC (rev 40887)
@@ -1,26 +1,31 @@
---- Makefile.pre.in.orig 2007-09-29 02:15:52.000000000 +0200
-+++ Makefile.pre.in 2007-09-29 02:18:57.000000000 +0200
-@@ -373,6 +373,13 @@
- libpython$(VERSION).sl: $(LIBRARY_OBJS)
- $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM)
+--- Makefile.pre.in.orig 2008-06-19 20:47:03.000000000 -0600
++++ Makefile.pre.in 2008-07-28 19:57:15.000000000 -0600
+@@ -394,8 +394,8 @@
+ # Build the shared modules
+ sharedmods: $(BUILDPYTHON)
+ @case $$MAKEFLAGS in \
+- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
+- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
++ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q --no-user-cfg build;; \
++ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py --no-user-cfg build;; \
+ esac
-+libpython$(VERSION).dylib: $(LIBRARY)
-+ /usr/bin/libtool -o $@ -dynamic $(OTHER_LIBTOOL_OPT) \
-+ -all_load $(LIBRARY) -single_module \
-+ -install_name $(LIBDIR)/$@ \
-+ -compatibility_version $(VERSION) \
-+ -current_version $(VERSION) -lSystem -lSystemStubs $(LDFLAGS)
-+
- # This rule is here for OPENSTEP/Rhapsody/MacOSX. It builds a temporary
- # minimal framework (not including the Lib directory and such) in the current
- # directory.
-@@ -675,6 +682,9 @@
- fi \
- fi; \
- else true; \
-+ fi; \
-+ if test -f libpython$(VERSION).dylib; then \
-+ $(INSTALL_SHARED) libpython$(VERSION).dylib $(DESTDIR)$(LIBDIR); \
- fi
-
- # Install the manual page
+ # Build static library
+@@ -993,7 +993,7 @@
+ # Install the dynamically loadable modules
+ # This goes into $(exec_prefix)
+ sharedinstall:
+- $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
++ $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py --no-user-cfg install \
+ --prefix=$(prefix) \
+ --install-scripts=$(BINDIR) \
+ --install-platlib=$(DESTSHARED) \
+@@ -1073,7 +1073,7 @@
+ # This installs a few of the useful scripts in Tools/scripts
+ scriptsinstall:
+ SRCDIR=$(srcdir) $(RUNSHARED) \
+- ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/setup.py install \
++ ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/setup.py --no-user-cfg install \
+ --prefix=$(prefix) \
+ --install-scripts=$(BINDIR) \
+ --root=/$(DESTDIR)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20081016/ee5a740d/attachment.html
More information about the macports-changes
mailing list