aboutsummaryrefslogtreecommitdiffstats
path: root/_markerlib/markers.py
diff options
context:
space:
mode:
authorDaniel Holth <dholth@fastmail.fm>2012-08-27 18:54:29 -0400
committerDaniel Holth <dholth@fastmail.fm>2012-08-27 18:54:29 -0400
commit9ebbe014df37c19976a5a9cb0ac2fa228a03144a (patch)
tree0e16b78ef375b075a480b918052311b614d07659 /_markerlib/markers.py
parent4095eb5d31995c4a80d0a9b5125d8cefbf1d8390 (diff)
downloadexternal_python_setuptools-9ebbe014df37c19976a5a9cb0ac2fa228a03144a.tar.gz
external_python_setuptools-9ebbe014df37c19976a5a9cb0ac2fa228a03144a.tar.bz2
external_python_setuptools-9ebbe014df37c19976a5a9cb0ac2fa228a03144a.zip
impractical to support _markerlib on Python < 2.6 (no compile(ast))
--HG-- branch : distribute extra : rebase_source : c5019294d83fab26bc393fe72f086d0b13b1e337
Diffstat (limited to '_markerlib/markers.py')
-rw-r--r--_markerlib/markers.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/_markerlib/markers.py b/_markerlib/markers.py
index 293adf72..54c2828a 100644
--- a/_markerlib/markers.py
+++ b/_markerlib/markers.py
@@ -12,17 +12,13 @@ where EXPR belongs to any of those:
platform.version = platform.version()
platform.machine = platform.machine()
platform.python_implementation = platform.python_implementation()
- a free string, like '2.4', or 'win32'
+ a free string, like '2.6', or 'win32'
"""
__all__ = ['default_environment', 'compile', 'interpret']
-# Would import from ast but for Python 2.5
-from _ast import Compare, BoolOp, Attribute, Name, Load, Str, cmpop, boolop
-try:
- from ast import parse, copy_location, NodeTransformer
-except ImportError: # pragma no coverage
- from markerlib._markers_ast import parse, copy_location, NodeTransformer
+from ast import Compare, BoolOp, Attribute, Name, Load, Str, cmpop, boolop
+from ast import parse, copy_location, NodeTransformer
import os
import platform
@@ -104,7 +100,5 @@ def compile(marker):
_cache[marker] = marker_fn
return _cache[marker]
-as_function = compile # bw compat
-
def interpret(marker, environment=None):
return compile(marker)(environment)