[42997] trunk/dports/lang/python25
blb at macports.org
blb at macports.org
Tue Dec 2 21:16:31 PST 2008
Revision: 42997
http://trac.macports.org/changeset/42997
Author: blb at macports.org
Date: 2008-12-02 21:16:31 -0800 (Tue, 02 Dec 2008)
Log Message:
-----------
lang/python25 - add --no-user-cfg option to help avoid user config files
while building, ticket #9831 (maintainer timeout)
Modified Paths:
--------------
trunk/dports/lang/python25/Portfile
trunk/dports/lang/python25/files/patch-Makefile.pre.in.diff
Added Paths:
-----------
trunk/dports/lang/python25/files/patch-Lib-distutils-dist.py.diff
Modified: trunk/dports/lang/python25/Portfile
===================================================================
--- trunk/dports/lang/python25/Portfile 2008-12-03 04:59:42 UTC (rev 42996)
+++ trunk/dports/lang/python25/Portfile 2008-12-03 05:16:31 UTC (rev 42997)
@@ -4,7 +4,7 @@
name python25
version 2.5.2
-revision 5
+revision 6
set major 2
set branch 2.5
categories lang
@@ -25,9 +25,12 @@
sha1 7a835c93a904ae4ecb2d23b5183e94d3b92f8305 \
rmd160 a6e2e81910639a362f265af2e3814e7b47e2110a
+# 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-cgi.py.diff \
+ patch-Lib-distutils-dist.py.diff
depends_lib port:gettext
Added: trunk/dports/lang/python25/files/patch-Lib-distutils-dist.py.diff
===================================================================
--- trunk/dports/lang/python25/files/patch-Lib-distutils-dist.py.diff (rev 0)
+++ trunk/dports/lang/python25/files/patch-Lib-distutils-dist.py.diff 2008-12-03 05:16:31 UTC (rev 42997)
@@ -0,0 +1,51 @@
+--- Lib/distutils/dist.py.orig 2005-03-23 11:54:36.000000000 -0700
++++ Lib/distutils/dist.py 2008-07-25 21:27:15.000000000 -0600
+@@ -57,6 +57,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
+@@ -264,6 +265,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__ ()
+@@ -324,6 +331,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()
+@@ -343,7 +353,7 @@
+ user_filename = "pydistutils.cfg"
+
+ # And look for the user config file
+- if os.environ.has_key('HOME'):
++ if self.want_user_cfg and os.environ.has_key('HOME'):
+ user_file = os.path.join(os.environ.get('HOME'), user_filename)
+ if os.path.isfile(user_file):
+ files.append(user_file)
+@@ -353,6 +363,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/python25/files/patch-Makefile.pre.in.diff
===================================================================
--- trunk/dports/lang/python25/files/patch-Makefile.pre.in.diff 2008-12-03 04:59:42 UTC (rev 42996)
+++ trunk/dports/lang/python25/files/patch-Makefile.pre.in.diff 2008-12-03 05:16:31 UTC (rev 42997)
@@ -1,6 +1,17 @@
---- 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 @@
+--- Makefile.pre.in.orig 2007-12-05 13:43:57.000000000 -0700
++++ Makefile.pre.in 2008-07-25 21:41:02.000000000 -0600
+@@ -348,8 +348,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
+
+ # Build static library
+@@ -376,6 +376,13 @@
libpython$(VERSION).sl: $(LIBRARY_OBJS)
$(LDSHARED) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM)
@@ -14,7 +25,7 @@
# 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 @@
+@@ -684,6 +691,9 @@
fi \
fi; \
else true; \
@@ -24,3 +35,21 @@
fi
# Install the manual page
+@@ -894,7 +904,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) \
+@@ -968,7 +978,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/20081202/0aba0f83/attachment.html>
More information about the macports-changes
mailing list