aboutsummaryrefslogtreecommitdiffstats
path: root/pkg_resources.py
diff options
context:
space:
mode:
Diffstat (limited to 'pkg_resources.py')
-rw-r--r--pkg_resources.py45
1 files changed, 43 insertions, 2 deletions
diff --git a/pkg_resources.py b/pkg_resources.py
index 4cf81d7b..bfe92e3a 100644
--- a/pkg_resources.py
+++ b/pkg_resources.py
@@ -14,10 +14,31 @@ method.
"""
import sys, os, zipimport, time, re, imp, new
-from sets import ImmutableSet
+
+try:
+ frozenset
+except NameError:
+ from sets import ImmutableSet as frozenset
+
from os import utime, rename, unlink # capture these to bypass sandboxing
from os import open as os_open
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
def get_supported_platform():
"""Return this platform's maximum compatible version.
@@ -39,6 +60,26 @@ def get_supported_platform():
pass # not Mac OS X
return plat
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
__all__ = [
# Basic resource access and distribution/entry point discovery
'require', 'run_script', 'get_provider', 'get_distribution',
@@ -2387,7 +2428,7 @@ class Requirement:
self.index, self.extras = index, tuple(map(safe_extra,extras))
self.hashCmp = (
self.key, tuple([(op,parsed) for parsed,trans,op,ver in index]),
- ImmutableSet(self.extras)
+ frozenset(self.extras)
)
self.__hash = hash(self.hashCmp)