[Python-checkins] python/nondist/sandbox/setuptools/setuptools archive_util.py, 1.2, 1.3 dist.py, 1.12, 1.13 package_index.py, 1.9, 1.10 sandbox.py, 1.3, 1.4

pje@users.sourceforge.net pje at users.sourceforge.net
Sun Jul 10 06:49:41 CEST 2005


Update of /cvsroot/python/python/nondist/sandbox/setuptools/setuptools
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19865/setuptools
Modified Files:
	archive_util.py dist.py package_index.py sandbox.py 
Log Message:
Detect and handle conflicts with "unmanaged" packages when installing
packages managed by EasyInstall. Also, add an option to exclude source
files from .egg distributions.
Index: archive_util.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/setuptools/setuptools/archive_util.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- archive_util.py	15 Jun 2005 02:11:09 -0000	1.2
+++ archive_util.py	10 Jul 2005 04:49:31 -0000	1.3
@@ -8,8 +8,9 @@
 
 import zipfile, tarfile, os
 from pkg_resources import ensure_directory
+from distutils.errors import DistutilsError
 
-class UnrecognizedFormat(RuntimeError):
+class UnrecognizedFormat(DistutilsError):
 """Couldn't recognize the archive type"""
 
 def default_filter(src,dst):
@@ -38,7 +39,6 @@
 
 
 
-
 def unpack_archive(filename, extract_dir, progress_filter=default_filter,
 drivers=None
 ):
Index: dist.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/setuptools/setuptools/dist.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- dist.py	8 Jul 2005 05:09:23 -0000	1.12
+++ dist.py	10 Jul 2005 04:49:31 -0000	1.13
@@ -420,13 +420,16 @@
 
 def install_eggs(self):
 from setuptools.command.easy_install import easy_install
- cmd = easy_install(self, args="x")
+ cmd = easy_install(self, args="x", ignore_conflicts_at_my_risk=1)
 cmd.ensure_finalized() # finalize before bdist_egg munges install cmd
+
 self.run_command('bdist_egg')
 args = [self.get_command_obj('bdist_egg').egg_output]
+
 if setuptools.bootstrap_install_from:
 # Bootstrap self-installation of setuptools
 args.insert(0, setuptools.bootstrap_install_from)
+
 cmd.args = args
 cmd.run()
 self.have_run['install'] = 1
@@ -446,9 +449,6 @@
 
 
 
-
-
-
 def get_cmdline_options(self):
 """Return a '{cmd: {opt:val}}' map of all command-line options
 
Index: package_index.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/setuptools/setuptools/package_index.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- package_index.py	7 Jul 2005 16:28:43 -0000	1.9
+++ package_index.py	10 Jul 2005 04:49:31 -0000	1.10
@@ -3,6 +3,7 @@
 import sys, os.path, re, urlparse, urllib2
 from pkg_resources import *
 from distutils import log
+from distutils.errors import DistutilsError
 
 HREF = re.compile(r"""href\s*=\s*['"]?([^'"> ]+)""", re.I)
 URL_SCHEME = re.compile('([-+.a-z0-9]{2,}):',re.I).match
@@ -38,7 +39,6 @@
 
 
 
-
 def distros_for_url(url, metadata=None):
 """Yield egg or source distribution objects that might be found at a URL"""
 
@@ -272,7 +272,7 @@
 try:
 spec = Requirement.parse(spec)
 except ValueError:
- raise RuntimeError(
+ raise DistutilsError(
 "Not a URL, existing file, or requirement spec: %r" %
 (spec,)
 )
@@ -336,7 +336,7 @@
 try:
 fp = self.open_url(url)
 if isinstance(fp, urllib2.HTTPError):
- raise RuntimeError(
+ raise DistutilsError(
 "Can't download %s: %s %s" % (url, fp.code,fp.msg)
 )
 
@@ -373,7 +373,7 @@
 except urllib2.HTTPError, v:
 return v
 except urllib2.URLError, v:
- raise RuntimeError("Download error: %s" % v.reason)
+ raise DistutilsError("Download error: %s" % v.reason)
 
 
 def _download_url(self, scheme, url, tmpdir):
@@ -432,7 +432,7 @@
 return self._download_sourceforge(url, page, tmpdir)
 break # not an index page
 file.close()
- raise RuntimeError("Unexpected HTML page found at "+url)
+ raise DistutilsError("Unexpected HTML page found at "+url)
 
 
 def _download_svn(self, url, filename):
@@ -457,7 +457,7 @@
 mirror_regex = re.compile(r'HREF=(/.*?\?use_mirror=[^>]*)')
 urls = [m.group(1) for m in mirror_regex.finditer(sf_page)]
 if not urls:
- raise RuntimeError(
+ raise DistutilsError(
 "URL looks like a Sourceforge mirror page, but no URLs found"
 )
 
@@ -481,7 +481,7 @@
 scheme = URL_SCHEME(download_url)
 return self._download_url(scheme.group(1), download_url, tmpdir)
 else:
- raise RuntimeError(
+ raise DistutilsError(
 'No META HTTP-EQUIV="refresh" found in Sourceforge page at %s'
 % url
 )
Index: sandbox.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/setuptools/setuptools/sandbox.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- sandbox.py	25 Jun 2005 19:33:06 -0000	1.3
+++ sandbox.py	10 Jul 2005 04:49:31 -0000	1.4
@@ -1,7 +1,7 @@
 import os, sys, __builtin__, tempfile
 _os = sys.modules[os.name]
 _open = open
-
+from distutils.errors import DistutilsError
 __all__ = [
 "AbstractSandbox", "DirectorySandbox", "SandboxViolation", "run_setup",
 ]
@@ -188,7 +188,7 @@
 return (src,dst)
 
 
-class SandboxViolation(RuntimeError):
+class SandboxViolation(DistutilsError):
 """A setup script attempted to modify the filesystem outside the sandbox"""
 
 def __str__(self):


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /