Skip to content

Commit 2da923a

Browse files
committed
Merge branch 'master' of github.com:pykler/yajl-py
Conflicts: .gitignore examples/json_reformat.py
2 parents f97de48 + e66c2ea commit 2da923a

File tree

13 files changed

+143
-28
lines changed

13 files changed

+143
-28
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ dist/
1616
build/
1717
*.egg-info/
1818

19+
# yajl build
20+
yajl-src
21+
1922
# developer specifics
2023
.virtualenv/
2124
.vagrant/

.travis.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
language: python
2+
python:
3+
- "2.6"
4+
- "2.7"
5+
install:
6+
- "make deps"
7+
- "make install"
8+
before_script:
9+
- "pip install python-coveralls --use-mirrors"
10+
script: "make test"
11+
after_success:
12+
- "coveralls"

COPYING

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright © 2009, 2010
1+
Copyright © 2009, 2010, 2011, 2012, 2013
22

33
Hatem Nassrat
44

Makefile

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,24 @@ SHELL=/bin/bash
22
HTMLDIR=doc/build/html
33
HTMLSED=find ${HTMLDIR}/ -name '*.html' | xargs sed -i
44

5-
.PHONY: usage install test doc gh-pages build-doc
5+
.PHONY: usage install deps test doc gh-pages build-doc
66

77
usage:
88
@echo
99
@echo Makefile for yajl-py
1010
@echo
1111
@echo Targets
1212
@echo " install :" easy_install yajl-py
13+
@echo " deps :" install compatible yajl version
1314
@echo " test :" run yajl-py tests
1415
@echo " doc :" install docs to gh-pages branch
1516

1617
install:
17-
easy_install .
18+
pip install . --use-mirrors
1819

1920
test:
20-
nosetests -v tests/
21+
pip install -r test_requirements.txt --use-mirrors
22+
nosetests --with-cov --cover-erase --cov yajl -v tests/
2123

2224
doc: gh-pages
2325

@@ -31,3 +33,10 @@ build-doc:
3133
${HTMLSED} 's/_sources/sources/g'
3234
mv ${HTMLDIR}/{_,}static
3335
${HTMLSED} 's/_static/static/g'
36+
37+
deps:
38+
rm -fr yajl-src
39+
git clone https://github.com/lloyd/yajl.git yajl-src
40+
(cd yajl-src; git checkout 4c539cb5b; git reset --hard; ./configure)
41+
sudo make -C yajl-src install
42+
sudo ldconfig

README.rst

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,41 @@
22
yajl-py
33
=======
44

5-
`yajl-py` is a Pure Python wrapper (implemented using
5+
6+
.. image:: https://travis-ci.org/pykler/yajl-py.png?branch=master
7+
:target: https://travis-ci.org/pykler/yajl-py
8+
9+
.. image:: https://coveralls.io/repos/pykler/yajl-py/badge.png
10+
:target: https://coveralls.io/r/pykler/yajl-py
11+
12+
.. image:: https://pypip.in/v/yajl-py/badge.png
13+
:target: https://crate.io/packages/yajl-py/#info
14+
15+
.. image:: https://pypip.in/d/yajl-py/badge.png
16+
:target: https://crate.io/packages/yajl-py/#info
17+
18+
.. image:: https://requires.io/github/pykler/yajl-py/requirements.png?branch=master
19+
:target: https://requires.io/github/pykler/yajl-py/requirements/?branch=master
20+
21+
``yajl-py`` is a Pure Python wrapper (implemented using
622
ctypes) to the excellent Yajl (Yet Another JSON Library) C
723
library.
824

9-
`yajl` and `yajl-py`, allow for fast stream parsing of JSON
25+
``yajl`` and ``yajl-py``, allow for fast stream parsing of JSON
1026
files, which enables the parsing of large files, that would
1127
not fit in memory.
1228

1329
Dependencies
1430
------------
1531

1632
- python 2.6 (or compatible)
17-
- yajl (from http://lloyd.github.com/yajl/)
33+
- `yajl <http://lloyd.github.com/yajl/>`_
1834

1935
To run the tests you also require:
2036

21-
- make (to run `make test`)
22-
- nose (debian package == `python-nose`)
23-
- MiniMockTest (`pip install minimocktest`)
37+
- make (to run ``make test``)
38+
- nose (debian package == ``python-nose``)
39+
- MiniMockTest (``pip install minimocktest``)
2440

2541
Install
2642
-------
@@ -31,10 +47,23 @@ From within the current directory run::
3147

3248
- OR Alternatively -
3349

34-
easy_install .
50+
pip install .
51+
52+
To install from pypi::
53+
54+
pip install yajl-py
3555

3656
Usage
3757
-----
3858

3959
The examples directory contains full featured JSON Parsers built using
40-
`yajl` and `yajl-py`. See `examples/README.rst` for more info.
60+
``yajl`` and ``yajl-py``. See `examples/README.rst <examples/>`_ for more info.
61+
62+
Contributions
63+
-------------
64+
65+
The following people provided valuable contributions to this library:
66+
67+
* `Peter Dobcsanyi`
68+
* `Charles Gordon <https://github.com/cgordon>`_
69+
* `Christopher Reighley <https://github.com/reighley-christopher>`_

doc/source/conf.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@
1010
#
1111
# All configuration values have a default; values that are commented out
1212
# serve to show the default.
13-
1413
import sys, os
14+
import sphinx_rtd_theme
1515

1616
# If extensions (or modules to document with autodoc) are in another directory,
1717
# add these directories to sys.path here. If the directory is relative to the
1818
# documentation root, use os.path.abspath to make it absolute, like shown here.
1919
sys.path = [os.path.abspath('../../')] + sys.path
2020

21+
2122
# -- General configuration -----------------------------------------------------
2223

2324
# Add any Sphinx extension module names here, as strings. They can be extensions
@@ -45,9 +46,9 @@
4546
# built documents.
4647
#
4748
# The short X.Y version.
48-
version = '1.0.11'
49+
from yajl import __version__ as version
4950
# The full version, including alpha/beta/rc tags.
50-
release = '1.0.11'
51+
release = version
5152

5253
# The language for content autogenerated by Sphinx. Refer to documentation
5354
# for a list of supported languages.
@@ -91,19 +92,21 @@
9192

9293
# The theme to use for HTML and HTML Help pages. Major themes that come with
9394
# Sphinx are currently 'default' and 'sphinxdoc'.
94-
html_theme = 'default'
95+
# html_theme = 'default'
9596
# html_theme = 'sphinxdoc'
97+
html_theme = "sphinx_rtd_theme"
9698

9799
# Theme options are theme-specific and customize the look and feel of a theme
98100
# further. For a list of options available for each theme, see the
99101
# documentation.
100-
#html_theme_options = {}
101-
html_theme_options = {
102-
"stickysidebar": "true",
103-
}
102+
html_theme_options = {}
103+
# html_theme_options = {
104+
# "stickysidebar": "true",
105+
# }
104106

105107
# Add any paths that contain custom themes here, relative to this directory.
106108
#html_theme_path = []
109+
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
107110

108111
# The name for this set of Sphinx documents. If None, it defaults to
109112
# "<project> v<release> documentation".

doc/source/index.rst

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
1-
Welcome to Yajl-Py's documentation!
2-
===================================
1+
Yajl-Py documentation
2+
=====================
3+
4+
.. image:: https://travis-ci.org/pykler/yajl-py.png?branch=master
5+
:target: https://travis-ci.org/pykler/yajl-py
6+
7+
.. image:: https://coveralls.io/repos/pykler/yajl-py/badge.png
8+
:target: https://coveralls.io/r/pykler/yajl-py
9+
10+
.. image:: https://pypip.in/v/yajl-py/badge.png
11+
:target: https://crate.io/packages/yajl-py/#info
12+
13+
.. image:: https://pypip.in/d/yajl-py/badge.png
14+
:target: https://crate.io/packages/yajl-py/#info
315

416
`yajl-py <http://github.com/pykler/yajl-py>`_ is a pure python wrapper
517
to the `yajl <http://lloyd.github.com/yajl/>`_ C Library.
@@ -25,10 +37,12 @@ Installation
2537

2638
To install the latest version of yajl-py, run::
2739

28-
easy_install yajl-py
40+
pip install yajl-py
2941

3042
For the development version you may visit
31-
`yajl-py at github <http://github.com/pykler/yajl-py>`_.
43+
`yajl-py at github <http://github.com/pykler/yajl-py>`_::
44+
45+
pip install git+https://github.com/pykler/yajl-py.git
3246

3347
Alternatives
3448
------------

doc_requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sphinx_rtd_theme

examples/json_reformat.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ def main():
112112
# initialize the parser
113113
yajl_parser = YajlParser(ch)
114114
yajl_parser.allow_comments = True # let's allow comments by default
115+
yajl_parser.allow_multiple_values = True
115116
yajl_parser.dont_validate_strings = options.dont_validate_strings
116117
yajl_parser.allow_multiple_values = options.stream
117118
yajl_parser.parse()

test_requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
minimocktest
2+
nose
3+
nose-cov

0 commit comments

Comments
 (0)