summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MANIFEST.in6
-rw-r--r--Makefile6
-rw-r--r--README12
-rw-r--r--announcement.msg15
-rw-r--r--examples/pygments-lexer/example.raw1423
-rw-r--r--ez_setup.py275
-rw-r--r--lib/yaml/__init__.py4
-rw-r--r--setup.py217
-rw-r--r--tests/test_all.py15
9 files changed, 249 insertions, 1724 deletions
diff --git a/MANIFEST.in b/MANIFEST.in
index d1fb8ce..1c6b8bf 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,2 +1,4 @@
-include ext/_yaml.pyx ext/_yaml.pxd ext/_yaml.h ext/_yaml.c
-exclude announcement.msg MANIFEST.in Makefile
+include README LICENSE setup.py
+recursive-include examples *.py *.cfg *.yaml
+#recursive-include tests *.py
+#recursive-include tests/data *
diff --git a/Makefile b/Makefile
index 2b87e3b..7991206 100644
--- a/Makefile
+++ b/Makefile
@@ -17,10 +17,10 @@ force:
forceext:
${PYTHON} setup.py --with-libyaml build -f ${PARAMETERS}
-install: build
+install:
${PYTHON} setup.py install ${PARAMETERS}
-installext: buildext
+installext:
${PYTHON} setup.py --with-libyaml install ${PARAMETERS}
test: build
@@ -29,7 +29,7 @@ test: build
testext: buildext
${PYTHON} tests/test_build_ext.py ${TEST}
-dist: buildext
+dist:
${PYTHON} setup.py --with-libyaml sdist --formats=zip,gztar
windist:
diff --git a/README b/README
index 7eaf7d8..c495200 100644
--- a/README
+++ b/README
@@ -2,9 +2,15 @@ PyYAML - The next generation YAML parser and emitter for Python.
To install, type 'python setup.py install'.
-To build and install PyYAML with LibYAML bindings, type
-'python setup.py --with-libyaml install'.
-Then you may use a fast LibYAML-based parser and emitter as follows:
+By default, the setup.py script checks whether LibYAML is installed
+and if so, builds and installs LibYAML bindings. To skip the check
+and force installation of LibYAML bindings, use the option '--with-libyaml':
+'python setup.py --with-libyaml install'. To disable the check and
+skip building and installing LibYAML bindings, use '--without-libyaml':
+'python setup.py --without-libyaml install'.
+
+When LibYAML bindings are installed, you may use fast LibYAML-based
+parser and emitter as follows:
>>> yaml.load(stream, Loader=yaml.CLoader)
>>> yaml.dump(data, Dumper=yaml.CDumper)
diff --git a/announcement.msg b/announcement.msg
index a3f15d1..35d1630 100644
--- a/announcement.msg
+++ b/announcement.msg
@@ -14,15 +14,18 @@ A new bug fix release of PyYAML is now available:
Changes
=======
-* Fixed a dot '.' character being recognized as !!float.
-* Fixed exceptions produced by LibYAML bindings.
+* setup.py checks whether LibYAML is installed and if so, builds
+ and installs LibYAML bindings. To force or disable installation
+ of LibYAML bindings, use '--with-libyaml' or '--without-libyaml'
+ respectively.
+* Building LibYAML bindings no longer requires Pyrex installed.
* 'yaml.load()' raises an exception if the input stream contains
more than one YAML document.
-* Use setuptools for setup.py. If you want to build optional LibYAML
- bindings, run 'python setup.py --with-libyaml install'. Building
- LibYAML bindings no longer requires PyRex installed.
+* Fixed exceptions produced by LibYAML bindings.
+* Fixed a dot '.' character being recognized as !!float.
+* Fixed Python 2.3 compatibility issue in constructing !!timestamp values.
* Windows binary packages are built against the LibYAML stable branch.
-* Added an attribute 'yaml.__version__' and a flag 'yaml.__libyaml__'.
+* Added attributes 'yaml.__version__' and 'yaml.__with_libyaml__'.
Resources
diff --git a/examples/pygments-lexer/example.raw b/examples/pygments-lexer/example.raw
deleted file mode 100644
index d31f4aa..0000000
--- a/examples/pygments-lexer/example.raw
+++ /dev/null
@@ -1,1423 +0,0 @@
-Token.Comment.Single u'#'
-Token.Text.Break u'\n'
-Token.Comment.Single u'# Examples from the Preview section of the YAML specification'
-Token.Text.Break u'\n'
-Token.Comment.Single u'# (http://yaml.org/spec/1.2/#Preview)'
-Token.Text.Break u'\n'
-Token.Comment.Single u'#'
-Token.Text.Break u'\n\n'
-Token.Comment.Single u'# Sequence of scalars'
-Token.Text.Break u'\n'
-Token.Punctuation.Document u'---'
-Token.Text.Break u'\n'
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'Mark'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'McGwire'
-Token.Text.Break u'\n'
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'Sammy'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Sosa'
-Token.Text.Break u'\n'
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'Ken'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Griffey'
-Token.Text.Break u'\n\n'
-Token.Comment.Single u'# Mapping scalars to scalars'
-Token.Text.Break u'\n'
-Token.Punctuation.Document u'---'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'hr'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'65'
-Token.Text.Blank u' '
-Token.Comment.Single u'# Home runs'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'avg'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'0.278'
-Token.Text.Blank u' '
-Token.Comment.Single u'# Batting average'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'rbi'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'147'
-Token.Text.Blank u' '
-Token.Comment.Single u'# Runs Batted In'
-Token.Text.Break u'\n\n'
-Token.Comment.Single u'# Mapping scalars to sequences'
-Token.Text.Break u'\n'
-Token.Punctuation.Document u'---'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'american'
-Token.Punctuation.Indicator u':'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'Boston'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Red'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Sox'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'Detroit'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Tigers'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'New'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'York'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Yankees'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'national'
-Token.Punctuation.Indicator u':'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'New'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'York'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Mets'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'Chicago'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Cubs'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'Atlanta'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Braves'
-Token.Text.Break u'\n\n'
-Token.Comment.Single u'# Sequence of mappings'
-Token.Text.Break u'\n'
-Token.Punctuation.Document u'---'
-Token.Text.Break u'\n'
-Token.Punctuation.Indicator u'-'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'name'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'Mark'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'McGwire'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'hr'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'65'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'avg'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'0.278'
-Token.Text.Break u'\n'
-Token.Punctuation.Indicator u'-'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'name'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'Sammy'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Sosa'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'hr'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'63'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'avg'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'0.288'
-Token.Text.Break u'\n\n'
-Token.Comment.Single u'# Sequence of sequences'
-Token.Text.Break u'\n'
-Token.Punctuation.Document u'---'
-Token.Text.Break u'\n'
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Punctuation.Indicator u'['
-Token.Literal.Scalar.Plain u'name'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u','
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'hr'
-Token.Punctuation.Indicator u','
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'avg'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u']'
-Token.Text.Break u'\n'
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Punctuation.Indicator u'['
-Token.Literal.Scalar.Plain u'Mark'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'McGwire'
-Token.Punctuation.Indicator u','
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'65'
-Token.Punctuation.Indicator u','
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'0.278'
-Token.Punctuation.Indicator u']'
-Token.Text.Break u'\n'
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Punctuation.Indicator u'['
-Token.Literal.Scalar.Plain u'Sammy'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Sosa'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u','
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'63'
-Token.Punctuation.Indicator u','
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'0.288'
-Token.Punctuation.Indicator u']'
-Token.Text.Break u'\n\n'
-Token.Comment.Single u'# Mapping of mappings'
-Token.Text.Break u'\n'
-Token.Punctuation.Document u'---'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'Mark'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'McGwire'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u'{'
-Token.Literal.Scalar.Plain u'hr'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'65'
-Token.Punctuation.Indicator u','
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'avg'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'0.278'
-Token.Punctuation.Indicator u'}'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'Sammy'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Sosa'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u'{'
-Token.Text.Break u'\n'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'hr'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'63'
-Token.Punctuation.Indicator u','
-Token.Text.Break u'\n'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'avg'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'0.288'
-Token.Text.Break u'\n'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u'}'
-Token.Text.Break u'\n\n'
-Token.Comment.Single u'# Two documents in a stream'
-Token.Text.Break u'\n'
-Token.Punctuation.Document u'---'
-Token.Text.Blank u' '
-Token.Comment.Single u'# Ranking of 1998 home runs'
-Token.Text.Break u'\n'
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'Mark'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'McGwire'
-Token.Text.Break u'\n'
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'Sammy'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Sosa'
-Token.Text.Break u'\n'
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'Ken'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Griffey'
-Token.Text.Break u'\n'
-Token.Punctuation.Document u'---'
-Token.Text.Blank u' '
-Token.Comment.Single u'# Team ranking'
-Token.Text.Break u'\n'
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'Chicago'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Cubs'
-Token.Text.Break u'\n'
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'St'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Louis'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Cardinals'
-Token.Text.Break u'\n\n'
-Token.Comment.Single u'# Documents with the end indicator'
-Token.Text.Break u'\n'
-Token.Punctuation.Document u'---'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'time'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'20:03:20'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'player'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'Sammy'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Sosa'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'action'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'strike'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'(miss)'
-Token.Text.Break u'\n'
-Token.Punctuation.Document u'...'
-Token.Text.Break u'\n'
-Token.Punctuation.Document u'---'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'time'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'20:03:47'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'player'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'Sammy'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Sosa'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'action'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'grand'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'slam'
-Token.Text.Break u'\n'
-Token.Punctuation.Document u'...'
-Token.Text.Break u'\n\n'
-Token.Comment.Single u'# Comments'
-Token.Text.Break u'\n'
-Token.Punctuation.Document u'---'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'hr'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Comment.Single u'# 1998 hr ranking'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'Mark'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'McGwire'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'Sammy'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Sosa'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'rbi'
-Token.Punctuation.Indicator u':'
-Token.Text.Break u'\n'
-Token.Text.Blank u' '
-Token.Comment.Single u'# 1998 rbi ranking'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'Sammy'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Sosa'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'Ken'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Griffey'
-Token.Text.Break u'\n\n'
-Token.Comment.Single u'# Anchors and aliases'
-Token.Text.Break u'\n'
-Token.Punctuation.Document u'---'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'hr'
-Token.Punctuation.Indicator u':'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'Mark'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'McGwire'
-Token.Text.Break u'\n'
-Token.Text.Blank u' '
-Token.Comment.Single u'# Following node labeled SS'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Name.Anchor u'&SS'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'Sammy'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Sosa'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'rbi'
-Token.Punctuation.Indicator u':'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Name.Alias u'*SS'
-Token.Text.Blank u' '
-Token.Comment.Single u'# Subsequent occurrence'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'Ken'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Griffey'
-Token.Text.Break u'\n\n'
-Token.Comment.Single u'# Mapping between sequences'
-Token.Text.Break u'\n'
-Token.Punctuation.Document u'---'
-Token.Text.Break u'\n'
-Token.Punctuation.Indicator u'?'
-Token.Text.Indent u' '
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'Detroit'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Tigers'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'Chicago'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'cubs'
-Token.Text.Break u'\n'
-Token.Punctuation.Indicator u':'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'2001-07-23'
-Token.Text.Break u'\n'
-Token.Punctuation.Indicator u'?'
-Token.Text.Indent u' '
-Token.Punctuation.Indicator u'['
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'New'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'York'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Yankees'
-Token.Punctuation.Indicator u','
-Token.Text.Break u'\n'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'Atlanta'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Braves'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u']'
-Token.Text.Break u'\n'
-Token.Punctuation.Indicator u':'
-Token.Text.Indent u' '
-Token.Punctuation.Indicator u'['
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'2001-07-02'
-Token.Punctuation.Indicator u','
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'2001-08-12'
-Token.Punctuation.Indicator u','
-Token.Text.Break u'\n'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'2001-08-14'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u']'
-Token.Text.Break u'\n\n'
-Token.Comment.Single u'# Inline nested mapping'
-Token.Text.Break u'\n'
-Token.Punctuation.Document u'---'
-Token.Text.Break u'\n'
-Token.Comment.Single u'# products purchased'
-Token.Text.Break u'\n'
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'item'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'Super'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Hoop'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'quantity'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'1'
-Token.Text.Break u'\n'
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'item'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'Basketball'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'quantity'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'4'
-Token.Text.Break u'\n'
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'item'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'Big'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Shoes'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'quantity'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'1'
-Token.Text.Break u'\n\n'
-Token.Comment.Single u'# Literal scalars'
-Token.Text.Break u'\n'
-Token.Punctuation.Document u'---'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u'|'
-Token.Text.Blank u' '
-Token.Comment.Single u'# ASCII art'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Block u'\\//||\\/||'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Block u'// || ||__'
-Token.Text.Break u'\n'
-Token.Text.Break u'\n'
-Token.Comment.Single u'# Folded scalars'
-Token.Text.Break u'\n'
-Token.Punctuation.Document u'---'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u'>'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Block u"Mark McGwire's"
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Block u'year was crippled'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Block u'by a knee injury.'
-Token.Text.Break u'\n'
-Token.Text.Break u'\n'
-Token.Comment.Single u'# Preserved indented block in a folded scalar'
-Token.Text.Break u'\n'
-Token.Punctuation.Document u'---'
-Token.Text.Break u'\n'
-Token.Punctuation.Indicator u'>'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Block u'Sammy Sosa completed another'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Block u'fine season with great stats.'
-Token.Text.Break u'\n'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Block u'63 Home Runs'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Block u'0.288 Batting Average'
-Token.Text.Break u'\n'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Block u'What a year!'
-Token.Text.Break u'\n'
-Token.Text.Break u'\n'
-Token.Comment.Single u'# Indentation determines scope'
-Token.Text.Break u'\n'
-Token.Punctuation.Document u'---'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'name'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'Mark'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'McGwire'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'accomplishment'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u'>'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Block u'Mark set a major league'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Block u'home run record in 1998.'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'stats'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u'|'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Block u'65 Home Runs'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Block u'0.278 Batting Average'
-Token.Text.Break u'\n'
-Token.Text.Break u'\n'
-Token.Comment.Single u'# Quoted scalars'
-Token.Text.Break u'\n'
-Token.Punctuation.Document u'---'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'unicode'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Flow.Quote u'"'
-Token.Literal.Scalar.Flow u'Sosa'
-Token.Literal.Scalar.Flow u' '
-Token.Literal.Scalar.Flow u'did'
-Token.Literal.Scalar.Flow u' '
-Token.Literal.Scalar.Flow u'fine.'
-Token.Literal.Scalar.Flow.Escape u'\\u263A'
-Token.Literal.Scalar.Flow.Quote u'"'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'control'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Flow.Quote u'"'
-Token.Literal.Scalar.Flow.Escape u'\\b'
-Token.Literal.Scalar.Flow u'1998'
-Token.Literal.Scalar.Flow.Escape u'\\t'
-Token.Literal.Scalar.Flow u'1999'
-Token.Literal.Scalar.Flow.Escape u'\\t'
-Token.Literal.Scalar.Flow u'2000'
-Token.Literal.Scalar.Flow.Escape u'\\n'
-Token.Literal.Scalar.Flow.Quote u'"'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'hex'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'esc'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Flow.Quote u'"'
-Token.Literal.Scalar.Flow.Escape u'\\x0d'
-Token.Literal.Scalar.Flow.Escape u'\\x0a'
-Token.Literal.Scalar.Flow u' '
-Token.Literal.Scalar.Flow u'is'
-Token.Literal.Scalar.Flow u' '
-Token.Literal.Scalar.Flow.Escape u'\\r'
-Token.Literal.Scalar.Flow.Escape u'\\n'
-Token.Literal.Scalar.Flow.Quote u'"'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'single'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Flow.Quote u"'"
-Token.Literal.Scalar.Flow u'"Howdy!"'
-Token.Literal.Scalar.Flow u' '
-Token.Literal.Scalar.Flow u'he'
-Token.Literal.Scalar.Flow u' '
-Token.Literal.Scalar.Flow u'cried.'
-Token.Literal.Scalar.Flow.Quote u"'"
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'quoted'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Flow.Quote u"'"
-Token.Literal.Scalar.Flow u' '
-Token.Literal.Scalar.Flow u'#'
-Token.Literal.Scalar.Flow u' '
-Token.Literal.Scalar.Flow u'not'
-Token.Literal.Scalar.Flow u' '
-Token.Literal.Scalar.Flow u'a'
-Token.Literal.Scalar.Flow u' '
-Token.Literal.Scalar.Flow.Escape u"''"
-Token.Literal.Scalar.Flow u'comment'
-Token.Literal.Scalar.Flow.Escape u"''"
-Token.Literal.Scalar.Flow u'.'
-Token.Literal.Scalar.Flow.Quote u"'"
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'tie-fighter'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Flow.Quote u"'"
-Token.Literal.Scalar.Flow u'|\\-*-/|'
-Token.Literal.Scalar.Flow.Quote u"'"
-Token.Text.Break u'\n\n'
-Token.Comment.Single u'# Multi-line flow scalars'
-Token.Text.Break u'\n'
-Token.Punctuation.Document u'---'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'plain'
-Token.Punctuation.Indicator u':'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'This'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'unquoted'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'scalar'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'spans'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'many'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'lines.'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'quoted'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Flow.Quote u'"'
-Token.Literal.Scalar.Flow u'So'
-Token.Literal.Scalar.Flow u' '
-Token.Literal.Scalar.Flow u'does'
-Token.Literal.Scalar.Flow u' '
-Token.Literal.Scalar.Flow u'this'
-Token.Text.Break u'\n'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Flow u'quoted'
-Token.Literal.Scalar.Flow u' '
-Token.Literal.Scalar.Flow u'scalar.'
-Token.Literal.Scalar.Flow.Escape u'\\n'
-Token.Literal.Scalar.Flow.Quote u'"'
-Token.Text.Break u'\n\n'
-Token.Comment.Single u'# Integers'
-Token.Text.Break u'\n'
-Token.Punctuation.Document u'---'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'canonical'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'12345'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'decimal'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'+12_345'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'sexagesimal'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'3:25:45'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'octal'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'014'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'hexadecimal'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'0xC'
-Token.Text.Break u'\n\n'
-Token.Comment.Single u'# Floating point'
-Token.Text.Break u'\n'
-Token.Punctuation.Document u'---'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'canonical'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'1.23015e+3'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'exponential'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'12.3015e+02'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'sexagesimal'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'20:30.15'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'fixed'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'1_230.15'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'negative'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'infinity'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'-.inf'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'not'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'a'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'number'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'.NaN'
-Token.Text.Break u'\n\n'
-Token.Comment.Single u'# Miscellaneous'
-Token.Text.Break u'\n'
-Token.Punctuation.Document u'---'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'null'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'~'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'true'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'boolean'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'false'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'boolean'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'string'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Flow.Quote u"'"
-Token.Literal.Scalar.Flow u'12345'
-Token.Literal.Scalar.Flow.Quote u"'"
-Token.Text.Break u'\n\n'
-Token.Comment.Single u'# Timestamps'
-Token.Text.Break u'\n'
-Token.Punctuation.Document u'---'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'canonical'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'2001-12-15T02:59:43.1Z'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'iso8601'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'2001-12-14t21:59:43.10-05:00'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'spaced'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'2001-12-14'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'21:59:43.10'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'-5'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'date'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'2002-12-14'
-Token.Text.Break u'\n\n'
-Token.Comment.Single u'# Various explicit tags'
-Token.Text.Break u'\n'
-Token.Punctuation.Document u'---'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'not-date'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Name.Type u'!!str'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'2002-04-28'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'picture'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Name.Type u'!!binary'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u'|'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Block u'R0lGODlhDAAMAIQAAP//9/X'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Block u'17unp5WZmZgAAAOfn515eXv'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Block u'Pz7Y6OjuDg4J+fn5OTk6enp'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Block u'56enmleECcgggoBADs='
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'application'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'specific'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'tag'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Name.Type u'!something'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u'|'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Block u'The semantics of the tag'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Block u'above may be different for'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Block u'different documents.'
-Token.Text.Break u'\n'
-Token.Text.Break u'\n'
-Token.Comment.Single u'# Global tags'
-Token.Text.Break u'\n'
-Token.Name.Directive u'%TAG'
-Token.Text.Blank u' '
-Token.Name.Type u'!'
-Token.Text.Blank u' '
-Token.Name.Type u'tag:clarkevans.com,2002:'
-Token.Text.Break u'\n'
-Token.Punctuation.Document u'---'
-Token.Text.Blank u' '
-Token.Name.Type u'!shape'
-Token.Text.Break u'\n'
-Token.Text.Blank u' '
-Token.Comment.Single u'# Use the ! handle for presenting'
-Token.Text.Break u'\n'
-Token.Text.Blank u' '
-Token.Comment.Single u'# tag:clarkevans.com,2002:circle'
-Token.Text.Break u'\n'
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Name.Type u'!circle'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'center'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Name.Anchor u'&ORIGIN'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u'{'
-Token.Literal.Scalar.Plain u'x'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'73'
-Token.Punctuation.Indicator u','
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'y'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'129'
-Token.Punctuation.Indicator u'}'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'radius'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'7'
-Token.Text.Break u'\n'
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Name.Type u'!line'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'start'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Name.Alias u'*ORIGIN'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'finish'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u'{'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'x'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'89'
-Token.Punctuation.Indicator u','
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'y'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'102'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u'}'
-Token.Text.Break u'\n'
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Name.Type u'!label'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'start'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Name.Alias u'*ORIGIN'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'color'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'0xFFEEBB'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'text'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'Pretty'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'vector'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'drawing.'
-Token.Text.Break u'\n\n'
-Token.Comment.Single u'# Unordered sets'
-Token.Text.Break u'\n'
-Token.Punctuation.Document u'---'
-Token.Text.Blank u' '
-Token.Name.Type u'!!set'
-Token.Text.Break u'\n'
-Token.Comment.Single u'# sets are represented as a'
-Token.Text.Break u'\n'
-Token.Comment.Single u'# mapping where each key is'
-Token.Text.Break u'\n'
-Token.Comment.Single u'# associated with the empty string'
-Token.Text.Break u'\n'
-Token.Punctuation.Indicator u'?'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'Mark'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'McGwire'
-Token.Text.Break u'\n'
-Token.Punctuation.Indicator u'?'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'Sammy'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Sosa'
-Token.Text.Break u'\n'
-Token.Punctuation.Indicator u'?'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'Ken'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Griff'
-Token.Text.Break u'\n\n'
-Token.Comment.Single u'# Ordered mappings'
-Token.Text.Break u'\n'
-Token.Punctuation.Document u'---'
-Token.Text.Blank u' '
-Token.Name.Type u'!!omap'
-Token.Text.Break u'\n'
-Token.Comment.Single u'# ordered maps are represented as'
-Token.Text.Break u'\n'
-Token.Comment.Single u'# a sequence of mappings, with'
-Token.Text.Break u'\n'
-Token.Comment.Single u'# each mapping having one key'
-Token.Text.Break u'\n'
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'Mark'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'McGwire'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'65'
-Token.Text.Break u'\n'
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'Sammy'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Sosa'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'63'
-Token.Text.Break u'\n'
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'Ken'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Griffy'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'58'
-Token.Text.Break u'\n\n'
-Token.Comment.Single u'# Full length example'
-Token.Text.Break u'\n'
-Token.Punctuation.Document u'---'
-Token.Text.Blank u' '
-Token.Name.Type u'!<tag:clarkevans.com,2002:invoice>'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'invoice'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'34843'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'date'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'2001-01-23'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'bill-to'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Name.Anchor u'&id001'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'given'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'Chris'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'family'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'Dumars'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'address'
-Token.Punctuation.Indicator u':'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'lines'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u'|'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Block u'458 Walkman Dr.'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Block u'Suite #292'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'city'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'Royal'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Oak'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'state'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'MI'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'postal'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'48046'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'ship-to'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Name.Alias u'*id001'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'product'
-Token.Punctuation.Indicator u':'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'sku'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'BL394D'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'quantity'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'4'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'description'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'Basketball'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'price'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'450.00'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'sku'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'BL4438H'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'quantity'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'1'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'description'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'Super'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Hoop'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'price'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'2392.00'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'tax'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'251.42'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'total'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'4443.52'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'comments'
-Token.Punctuation.Indicator u':'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'Late'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'afternoon'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'is'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'best.'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'Backup'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'contact'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'is'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'Nancy'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'Billsmer'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'@'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'338-4338.'
-Token.Text.Break u'\n\n'
-Token.Comment.Single u'# Another full-length example'
-Token.Text.Break u'\n'
-Token.Punctuation.Document u'---'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'Time'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'2001-11-23'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'15:01:42'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'-5'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'User'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'ed'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'Warning'
-Token.Punctuation.Indicator u':'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'This'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'is'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'an'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'error'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'message'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'for'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'the'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'log'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'file'
-Token.Text.Break u'\n'
-Token.Punctuation.Document u'---'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'Time'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'2001-11-23'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'15:02:31'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'-5'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'User'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'ed'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'Warning'
-Token.Punctuation.Indicator u':'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'A'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'slightly'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'different'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'error'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'message.'
-Token.Text.Break u'\n'
-Token.Punctuation.Document u'---'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'Date'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'2001-11-23'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'15:03:17'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'-5'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'User'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'ed'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'Fatal'
-Token.Punctuation.Indicator u':'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'Unknown'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'variable'
-Token.Literal.Scalar.Plain u' '
-Token.Literal.Scalar.Plain u'"bar"'
-Token.Text.Break u'\n'
-Token.Literal.Scalar.Plain u'Stack'
-Token.Punctuation.Indicator u':'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'file'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'TopClass.py'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'line'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'23'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'code'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u'|'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Block u'x = MoreObject("345\\n")'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Punctuation.Indicator u'-'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'file'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'MoreClass.py'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'line'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Literal.Scalar.Plain u'58'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Plain u'code'
-Token.Punctuation.Indicator u':'
-Token.Text.Blank u' '
-Token.Punctuation.Indicator u'|'
-Token.Punctuation.Indicator u'-'
-Token.Text.Break u'\n'
-Token.Text.Indent u' '
-Token.Literal.Scalar.Block u'foo = bar'
-Token.Text.Break u'\n'
diff --git a/ez_setup.py b/ez_setup.py
deleted file mode 100644
index 14cd450..0000000
--- a/ez_setup.py
+++ /dev/null
@@ -1,275 +0,0 @@
-#!python
-"""Bootstrap setuptools installation
-
-If you want to use setuptools in your package's setup.py, just include this
-file in the same directory with it, and add this to the top of your setup.py::
-
- from ez_setup import use_setuptools
- use_setuptools()
-
-If you want to require a specific version of setuptools, set a download
-mirror, or use an alternate download directory, you can do so by supplying
-the appropriate options to ``use_setuptools()``.
-
-This file can also be run as a script to install or upgrade setuptools.
-"""
-import sys
-DEFAULT_VERSION = "0.6c9"
-DEFAULT_URL = "http://pypi.python.org/packages/%s/s/setuptools/" % sys.version[:3]
-
-md5_data = {
- 'setuptools-0.6b1-py2.3.egg': '8822caf901250d848b996b7f25c6e6ca',
- 'setuptools-0.6b1-py2.4.egg': 'b79a8a403e4502fbb85ee3f1941735cb',
- 'setuptools-0.6b2-py2.3.egg': '5657759d8a6d8fc44070a9d07272d99b',
- 'setuptools-0.6b2-py2.4.egg': '4996a8d169d2be661fa32a6e52e4f82a',
- 'setuptools-0.6b3-py2.3.egg': 'bb31c0fc7399a63579975cad9f5a0618',
- 'setuptools-0.6b3-py2.4.egg': '38a8c6b3d6ecd22247f179f7da669fac',
- 'setuptools-0.6b4-py2.3.egg': '62045a24ed4e1ebc77fe039aa4e6f7e5',
- 'setuptools-0.6b4-py2.4.egg': '4cb2a185d228dacffb2d17f103b3b1c4',
- 'setuptools-0.6c1-py2.3.egg': 'b3f2b5539d65cb7f74ad79127f1a908c',
- 'setuptools-0.6c1-py2.4.egg': 'b45adeda0667d2d2ffe14009364f2a4b',
- 'setuptools-0.6c2-py2.3.egg': 'f0064bf6aa2b7d0f3ba0b43f20817c27',
- 'setuptools-0.6c2-py2.4.egg': '616192eec35f47e8ea16cd6a122b7277',
- 'setuptools-0.6c3-py2.3.egg': 'f181fa125dfe85a259c9cd6f1d7b78fa',
- 'setuptools-0.6c3-py2.4.egg': 'e0ed74682c998bfb73bf803a50e7b71e',
- 'setuptools-0.6c3-py2.5.egg': 'abef16fdd61955514841c7c6bd98965e',
- 'setuptools-0.6c4-py2.3.egg': 'b0b9131acab32022bfac7f44c5d7971f',
- 'setuptools-0.6c4-py2.4.egg': '2a1f9656d4fbf3c97bf946c0a124e6e2',
- 'setuptools-0.6c4-py2.5.egg': '8f5a052e32cdb9c72bcf4b5526f28afc',
- 'setuptools-0.6c5-py2.3.egg': 'ee9fd80965da04f2f3e6b3576e9d8167',
- 'setuptools-0.6c5-py2.4.egg': 'afe2adf1c01701ee841761f5bcd8aa64',
- 'setuptools-0.6c5-py2.5.egg': 'a8d3f61494ccaa8714dfed37bccd3d5d',
- 'setuptools-0.6c6-py2.3.egg': '35686b78116a668847237b69d549ec20',
- 'setuptools-0.6c6-py2.4.egg': '3c56af57be3225019260a644430065ab',
- 'setuptools-0.6c6-py2.5.egg': 'b2f8a7520709a5b34f80946de5f02f53',
- 'setuptools-0.6c7-py2.3.egg': '209fdf9adc3a615e5115b725658e13e2',
- 'setuptools-0.6c7-py2.4.egg': '5a8f954807d46a0fb67cf1f26c55a82e',
- 'setuptools-0.6c7-py2.5.egg': '45d2ad28f9750e7434111fde831e8372',
- 'setuptools-0.6c8-py2.3.egg': '50759d29b349db8cfd807ba8303f1902',
- 'setuptools-0.6c8-py2.4.egg': 'cba38d74f7d483c06e9daa6070cce6de',
- 'setuptools-0.6c8-py2.5.egg': '1721747ee329dc150590a58b3e1ac95b',
- 'setuptools-0.6c9-py2.3.egg': 'a83c4020414807b496e4cfbe08507c03',
- 'setuptools-0.6c9-py2.4.egg': '260a2be2e5388d66bdaee06abec6342a',
- 'setuptools-0.6c9-py2.5.egg': 'fe67c3e5a17b12c0e7c541b7ea43a8e6',
-}
-
-import sys, os
-try: from hashlib import md5
-except ImportError: from md5 import md5
-
-def _validate_md5(egg_name, data):
- if egg_name in md5_data:
- digest = md5(data).hexdigest()
- if digest != md5_data[egg_name]:
- print >>sys.stderr, (
- "md5 validation of %s failed! (Possible download problem?)"
- % egg_name
- )
- sys.exit(2)
- return data
-
-def use_setuptools(
- version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir,
- download_delay=15
-):
- """Automatically find/download setuptools and make it available on sys.path
-
- `version` should be a valid setuptools version number that is available
- as an egg for download under the `download_base` URL (which should end with
- a '/'). `to_dir` is the directory where setuptools will be downloaded, if
- it is not already available. If `download_delay` is specified, it should
- be the number of seconds that will be paused before initiating a download,
- should one be required. If an older version of setuptools is installed,
- this routine will print a message to ``sys.stderr`` and raise SystemExit in
- an attempt to abort the calling script.
- """
- was_imported = 'pkg_resources' in sys.modules or 'setuptools' in sys.modules
- def do_download():
- egg = download_setuptools(version, download_base, to_dir, download_delay)
- sys.path.insert(0, egg)
- import setuptools; setuptools.bootstrap_install_from = egg
- try:
- import pkg_resources
- except ImportError:
- return do_download()
- try:
- pkg_resources.require("setuptools>="+version); return
- except pkg_resources.VersionConflict, e:
- if was_imported:
- print >>sys.stderr, (
- "The required version of setuptools (>=%s) is not available, and\n"
- "can't be installed while this script is running. Please install\n"
- " a more recent version first, using 'easy_install -U setuptools'."
- "\n\n(Currently using %r)"
- ) % (version, e.args[0])
- sys.exit(2)
- else:
- del pkg_resources, sys.modules['pkg_resources'] # reload ok
- return do_download()
- except pkg_resources.DistributionNotFound:
- return do_download()
-
-def download_setuptools(
- version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir,
- delay = 15
-):
- """Download setuptools from a specified location and return its filename
-
- `version` should be a valid setuptools version number that is available
- as an egg for download under the `download_base` URL (which should end
- with a '/'). `to_dir` is the directory where the egg will be downloaded.
- `delay` is the number of seconds to pause before an actual download attempt.
- """
- import urllib2, shutil
- egg_name = "setuptools-%s-py%s.egg" % (version,sys.version[:3])
- url = download_base + egg_name
- saveto = os.path.join(to_dir, egg_name)
- src = dst = None
- if not os.path.exists(saveto): # Avoid repeated downloads
- try:
- from distutils import log
- if delay:
- log.warn("""
----------------------------------------------------------------------------
-This script requires setuptools version %s to run (even to display
-help). I will attempt to download it for you (from
-%s), but
-you may need to enable firewall access for this script first.
-I will start the download in %d seconds.
-
-(Note: if this machine does not have network access, please obtain the file
-
- %s
-
-and place it in this directory before rerunning this script.)
----------------------------------------------------------------------------""",
- version, download_base, delay, url
- ); from time import sleep; sleep(delay)
- log.warn("Downloading %s", url)
- src = urllib2.urlopen(url)
- # Read/write all in one block, so we don't create a corrupt file
- # if the download is interrupted.
- data = _validate_md5(egg_name, src.read())
- dst = open(saveto,"wb"); dst.write(data)
- finally:
- if src: src.close()
- if dst: dst.close()
- return os.path.realpath(saveto)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-def main(argv, version=DEFAULT_VERSION):
- """Install or upgrade setuptools and EasyInstall"""
- try:
- import setuptools
- except ImportError:
- egg = None
- try:
- egg = download_setuptools(version, delay=0)
- sys.path.insert(0,egg)
- from setuptools.command.easy_install import main
- return main(list(argv)+[egg]) # we're done here
- finally:
- if egg and os.path.exists(egg):
- os.unlink(egg)
- else:
- if setuptools.__version__ == '0.0.1':
- print >>sys.stderr, (
- "You have an obsolete version of setuptools installed. Please\n"
- "remove it from your system entirely before rerunning this script."
- )
- sys.exit(2)
-
- req = "setuptools>="+version
- import pkg_resources
- try:
- pkg_resources.require(req)
- except pkg_resources.VersionConflict:
- try:
- from setuptools.command.easy_install import main
- except ImportError:
- from easy_install import main
- main(list(argv)+[download_setuptools(delay=0)])
- sys.exit(0) # try to force an exit
- else:
- if argv:
- from setuptools.command.easy_install import main
- main(argv)
- else:
- print "Setuptools version",version,"or greater has been installed."
- print '(Run "ez_setup.py -U setuptools" to reinstall or upgrade.)'
-
-def update_md5(filenames):
- """Update our built-in md5 registry"""
-
- import re
-
- for name in filenames:
- base = os.path.basename(name)
- f = open(name,'rb')
- md5_data[base] = md5(f.read()).hexdigest()
- f.close()
-
- data = [" %r: %r,\n" % it for it in md5_data.items()]
- data.sort()
- repl = "".join(data)
-
- import inspect
- srcfile = inspect.getsourcefile(sys.modules[__name__])
- f = open(srcfile, 'rb'); src = f.read(); f.close()
-
- match = re.search("\nmd5_data = {\n([^}]+)}", src)
- if not match:
- print >>sys.stderr, "Internal error!"
- sys.exit(2)
-
- src = src[:match.start(1)] + repl + src[match.end(1):]
- f = open(srcfile,'w')
- f.write(src)
- f.close()
-
-
-if __name__=='__main__':
- if len(sys.argv)>2 and sys.argv[1]=='--md5update':
- update_md5(sys.argv[2:])
- else:
- main(sys.argv[1:])
-
-
-
-
-
-
diff --git a/lib/yaml/__init__.py b/lib/yaml/__init__.py
index baa2146..d1ace1c 100644
--- a/lib/yaml/__init__.py
+++ b/lib/yaml/__init__.py
@@ -12,9 +12,9 @@ __version__ = '3.06'
try:
from cyaml import *
- __libyaml__ = True
+ __with_libyaml__ = True
except ImportError:
- __libyaml__ = False
+ __with_libyaml__ = False
def scan(stream, Loader=Loader):
"""
diff --git a/setup.py b/setup.py
index 8bffd56..610e477 100644
--- a/setup.py
+++ b/setup.py
@@ -30,10 +30,205 @@ CLASSIFIERS = [
"Topic :: Text Processing :: Markup",
]
-from ez_setup import use_setuptools
-use_setuptools(version='0.6c5')
-from setuptools import setup, Extension, Feature
+LIBYAML_CHECK = """
+#include <yaml.h>
+
+int main(void) {
+ yaml_parser_t parser;
+ yaml_emitter_t emitter;
+
+ yaml_parser_initialize(&parser);
+ yaml_parser_delete(&parser);
+
+ yaml_emitter_initialize(&emitter);
+ yaml_emitter_delete(&emitter);
+
+ return 0;
+}
+"""
+
+
+from distutils import log
+from distutils.core import setup, Command
+from distutils.core import Distribution as _Distribution
+from distutils.core import Extension as _Extension
+from distutils.dir_util import mkpath
+from distutils.command.build_ext import build_ext as _build_ext
+from distutils.errors import CompileError, LinkError, DistutilsPlatformError
+
+try:
+ from Pyrex.Distutils import Extension as _Extension
+ from Pyrex.Distutils import build_ext as _build_ext
+ with_pyrex = True
+except ImportError:
+ with_pyrex = False
+
+import sys, os.path
+
+
+class Distribution(_Distribution):
+
+ def __init__(self, attrs=None):
+ _Distribution.__init__(self, attrs)
+ if not self.ext_modules:
+ return
+ for idx in range(len(self.ext_modules)-1, -1, -1):
+ ext = self.ext_modules[idx]
+ if not isinstance(ext, Extension):
+ continue
+ setattr(self, ext.attr_name, None)
+ self.global_options = [
+ (ext.option_name, None,
+ "include %s (default if %s is available)"
+ % (ext.feature_description, ext.feature_name)),
+ (ext.neg_option_name, None,
+ "exclude %s" % ext.feature_description),
+ ] + self.global_options
+ self.negative_opt = self.negative_opt.copy()
+ self.negative_opt[ext.neg_option_name] = ext.option_name
+
+
+class Extension(_Extension):
+
+ def __init__(self, name, sources, feature_name, feature_description,
+ feature_check, **kwds):
+ if not with_pyrex:
+ for filename in sources[:]:
+ base, ext = os.path.splitext(filename)
+ if ext == '.pyx':
+ sources.remove(filename)
+ sources.append('%s.c' % base)
+ _Extension.__init__(self, name, sources, **kwds)
+ self.feature_name = feature_name
+ self.feature_description = feature_description
+ self.feature_check = feature_check
+ self.attr_name = 'with_' + feature_name.replace('-', '_')
+ self.option_name = 'with-' + feature_name
+ self.neg_option_name = 'without-' + feature_name
+
+
+class build_ext(_build_ext):
+
+ def run(self):
+ optional = True
+ disabled = True
+ for ext in self.extensions:
+ if isinstance(ext, Extension):
+ with_ext = getattr(self.distribution, ext.attr_name)
+ if with_ext is None:
+ disabled = False
+ elif with_ext:
+ optional = False
+ disabled = False
+ else:
+ optional = False
+ disabled = False
+ break
+ if disabled:
+ return
+ try:
+ _build_ext.run(self)
+ except DistutilsPlatformError, exc:
+ if optional:
+ log.warn(str(exc))
+ log.warn("skipping build_ext")
+ else:
+ raise
+
+ def get_source_files(self):
+ self.check_extensions_list(self.extensions)
+ filenames = []
+ for ext in self.extensions:
+ if with_pyrex:
+ self.pyrex_sources(ext.sources, ext)
+ for filename in ext.sources:
+ filenames.append(filename)
+ base = os.path.splitext(filename)[0]
+ for ext in ['c', 'h', 'pyx', 'pxd']:
+ filename = '%s.%s' % (base, ext)
+ if filename not in filenames and os.path.isfile(filename):
+ filenames.append(filename)
+ return filenames
+
+ def build_extensions(self):
+ self.check_extensions_list(self.extensions)
+ for ext in self.extensions:
+ if isinstance(ext, Extension):
+ with_ext = getattr(self.distribution, ext.attr_name)
+ if with_ext is None:
+ with_ext = self.check_extension_availability(ext)
+ if not with_ext:
+ continue
+ if with_pyrex:
+ ext.sources = self.pyrex_sources(ext.sources, ext)
+ self.build_extension(ext)
+
+ def check_extension_availability(self, ext):
+ cache = os.path.join(self.build_temp, 'check_%s.out' % ext.feature_name)
+ if not self.force and os.path.isfile(cache):
+ data = open(cache).read().strip()
+ if data == '1':
+ return True
+ elif data == '0':
+ return False
+ mkpath(self.build_temp)
+ src = os.path.join(self.build_temp, 'check_%s.c' % ext.feature_name)
+ open(src, 'w').write(ext.feature_check)
+ log.info("checking if %s compiles" % ext.feature_name)
+ try:
+ [obj] = self.compiler.compile([src],
+ macros=ext.define_macros+[(undef,) for undef in ext.undef_macros],
+ include_dirs=ext.include_dirs,
+ extra_postargs=(ext.extra_compile_args or []),
+ depends=ext.depends)
+ except CompileError:
+ log.warn("%s appears not to be installed" % ext.feature_name)
+ log.warn("(if %s is installed, you may need to specify"
+ % ext.feature_name)
+ log.warn(" the option --include-dirs or uncomment and modify")
+ log.warn(" the parameter include_dirs in setup.cfg)")
+ open(cache, 'w').write('0\n')
+ return False
+ prog = 'check_%s' % ext.feature_name
+ log.info("checking if %s links" % ext.feature_name)
+ try:
+ self.compiler.link_executable([obj], prog,
+ output_dir=self.build_temp,
+ libraries=ext.libraries,
+ library_dirs=ext.library_dirs,
+ runtime_library_dirs=ext.runtime_library_dirs,
+ extra_postargs=(ext.extra_link_args or []))
+ except LinkError:
+ log.warn("unable to link against %s" % ext.feature_name)
+ log.warn("(if %s is installed correctly, you may need to specify"
+ % ext.feature_name)
+ log.warn(" the option --library-dirs or uncomment and modify")
+ log.warn(" the parameter library_dirs in setup.cfg)")
+ open(cache, 'w').write('0\n')
+ return False
+ open(cache, 'w').write('1\n')
+ return True
+
+
+class test(Command):
+
+ user_options = []
+
+ def initialize_options(self):
+ pass
+
+ def finalize_options(self):
+ pass
+
+ def run(self):
+ build_cmd = self.get_finalized_command('build')
+ build_cmd.run()
+ sys.path.insert(0, build_cmd.build_lib)
+ sys.path.insert(0, 'tests')
+ import test_all
+ test_all.main()
+
if __name__ == '__main__':
@@ -52,14 +247,16 @@ if __name__ == '__main__':
package_dir={'': 'lib'},
packages=['yaml'],
+ ext_modules=[
+ Extension('_yaml', ['ext/_yaml.pyx'],
+ 'libyaml', "LibYAML bindings", LIBYAML_CHECK,
+ libraries=['yaml']),
+ ],
- features = {
- 'libyaml': Feature(
- description="LibYAML bindings",
- ext_modules=[
- Extension('_yaml', ['ext/_yaml.pyx'], libraries=['yaml']),
- ],
- ),
+ distclass=Distribution,
+ cmdclass={
+ 'build_ext': build_ext,
+# 'test': test,
},
)
diff --git a/tests/test_all.py b/tests/test_all.py
new file mode 100644
index 0000000..8ae1c76
--- /dev/null
+++ b/tests/test_all.py
@@ -0,0 +1,15 @@
+
+import unittest
+
+def main():
+ import yaml
+ names = ['test_yaml']
+ if yaml.__libyaml__:
+ names.append('test_yaml_ext')
+ suite = unittest.defaultTestLoader.loadTestsFromNames(names)
+ runner = unittest.TextTestRunner()
+ runner.run(suite)
+
+if __name__ == '__main__':
+ main()
+