diff --git a/.travis.yml b/.travis.yml index 515751a605c95e55c1c4ce221e1c30815e2f06e4_LnRyYXZpcy55bWw=..4890788900eb713c68beb1452b00dac2f73c70a7_LnRyYXZpcy55bWw= 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,34 @@ language: python -python: - - "2.6" - - "2.7" - - "3.3" - - "3.4" - - "3.5" - - "pypy" +cache: + directories: + - "$HOME/.cache/pip" + - "$HOME/.pyenv" +matrix: + include: + - os: linux + dist: trusty + python: '2.6' + - os: linux + dist: trusty + python: '2.7' + - os: linux + dist: trusty + python: '3.3' + - os: linux + dist: trusty + python: '3.4' + - os: linux + dist: trusty + python: '3.5' + - os: linux + dist: trusty + python: pypy + - os: osx + language: objective-c + env: PYENV_VERSION=2.7.11 + - os: osx + language: objective-c + env: PYENV_VERSION=3.5.1 +install: +- "./.travis/install.sh" script: @@ -9,4 +34,12 @@ script: - - python setup.py build_ext -i - - python -m compileall -f . - - python setup.py test +- "./.travis/run.sh" +deploy: + provider: releases + api_key: + secure: QiadMGAmtPw+Ut7LWqa3U/tImPIgiPH79mM9o8DGBckcacp9HkDYvCGuOjs5hZbCBBuQ6IAkikotS8iCSwHey1GK9jSDbpgKvVGiACdp8HNhitY8V/S3e1UukDlMeu+Q7vCJtynSGX0BJuiOQB8ZQyQ2HEZ7kMQgTLCEO1Uljhc= + file: dist/*.whl + file_glob: true + on: + repo: simplejson/simplejson + tags: true + skip_cleanup: true diff --git a/.travis/install.sh b/.travis/install.sh new file mode 100755 index 0000000000000000000000000000000000000000..4890788900eb713c68beb1452b00dac2f73c70a7_LnRyYXZpcy9pbnN0YWxsLnNo --- /dev/null +++ b/.travis/install.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +set -e +set -x + +if [[ $TRAVIS_OS_NAME == 'osx' ]]; then + if [ ! -e "$HOME/.pyenv" ]; then + git clone https://github.com/yyuu/pyenv.git ~/.pyenv + fi + PYENV_ROOT="$HOME/.pyenv" + PATH="$PYENV_ROOT/bin:$PATH" + eval "$(pyenv init -)" + hash -r + pyenv install --list + pyenv install -s $PYENV_VERSION + pip install wheel +fi diff --git a/.travis/run.sh b/.travis/run.sh new file mode 100755 index 0000000000000000000000000000000000000000..4890788900eb713c68beb1452b00dac2f73c70a7_LnRyYXZpcy9ydW4uc2g= --- /dev/null +++ b/.travis/run.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +set -e +set -x + +if [[ $TRAVIS_OS_NAME == 'osx' ]]; then + PYENV_ROOT="$HOME/.pyenv" + PATH="$PYENV_ROOT/bin:$PATH" + eval "$(pyenv init -)" +fi + +python setup.py build_ext -i +python -m compileall -f . +python setup.py test + +if [[ $TRAVIS_OS_NAME == 'osx' ]]; then + python setup.py bdist_wheel +fi diff --git a/CHANGES.txt b/CHANGES.txt index 515751a605c95e55c1c4ce221e1c30815e2f06e4_Q0hBTkdFUy50eHQ=..4890788900eb713c68beb1452b00dac2f73c70a7_Q0hBTkdFUy50eHQ= 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,12 @@ +Version 3.8.2 released 2016-02-14 + +* Fix implicit cast compiler warning in _speedups.c +* simplejson is now available as wheels for OS X and Windows thanks to Travis-CI + and AppVeyor respectively! Many thanks to @aebrahim for getting this party + started. + https://github.com/simplejson/simplejson/pull/130 + https://github.com/simplejson/simplejson/issues/122 + Version 3.8.1 released 2015-10-27 * Fix issue with iterable_as_array and indent option diff --git a/conf.py b/conf.py index 515751a605c95e55c1c4ce221e1c30815e2f06e4_Y29uZi5weQ==..4890788900eb713c68beb1452b00dac2f73c70a7_Y29uZi5weQ== 100644 --- a/conf.py +++ b/conf.py @@ -44,7 +44,7 @@ # The short X.Y version. version = '3.8' # The full version, including alpha/beta/rc tags. -release = '3.8.1' +release = '3.8.2' # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: diff --git a/scripts/artifacts.py b/scripts/artifacts.py new file mode 100644 index 0000000000000000000000000000000000000000..4890788900eb713c68beb1452b00dac2f73c70a7_c2NyaXB0cy9hcnRpZmFjdHMucHk= --- /dev/null +++ b/scripts/artifacts.py @@ -0,0 +1,22 @@ +try: + from urllib.request import urlopen +except ImportError: + from urllib import urlopen +import json +import subprocess + +api_url = 'https://ci.appveyor.com/api' +builds = json.load(urlopen( + '{}/projects/etrepum/simplejson'.format(api_url))) + +def artifact_url(job): + return '{api_url}/buildjobs/{jobId}/artifacts'.format( + api_url=api_url, **job) + +for job in builds['build']['jobs']: + url = artifact_url(job) + for artifact in json.load(urlopen(url)): + download_url = '{url}/{fileName}'.format(url=url, **artifact) + print(artifact['fileName']) + subprocess.call( + ['curl', '-L', '-#', '-o', artifact['fileName'], download_url]) diff --git a/setup.py b/setup.py index 515751a605c95e55c1c4ce221e1c30815e2f06e4_c2V0dXAucHk=..4890788900eb713c68beb1452b00dac2f73c70a7_c2V0dXAucHk= 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ DistutilsPlatformError IS_PYPY = hasattr(sys, 'pypy_translation_info') -VERSION = '3.8.1' +VERSION = '3.8.2' DESCRIPTION = "Simple, fast, extensible JSON encoder/decoder for Python" with open('README.rst', 'r') as f: diff --git a/simplejson/__init__.py b/simplejson/__init__.py index 515751a605c95e55c1c4ce221e1c30815e2f06e4_c2ltcGxlanNvbi9fX2luaXRfXy5weQ==..4890788900eb713c68beb1452b00dac2f73c70a7_c2ltcGxlanNvbi9fX2luaXRfXy5weQ== 100644 --- a/simplejson/__init__.py +++ b/simplejson/__init__.py @@ -97,7 +97,7 @@ Expecting property name: line 1 column 3 (char 2) """ from __future__ import absolute_import -__version__ = '3.8.1' +__version__ = '3.8.2' __all__ = [ 'dump', 'dumps', 'load', 'loads', 'JSONDecoder', 'JSONDecodeError', 'JSONEncoder', diff --git a/simplejson/_speedups.c b/simplejson/_speedups.c index 515751a605c95e55c1c4ce221e1c30815e2f06e4_c2ltcGxlanNvbi9fc3BlZWR1cHMuYw==..4890788900eb713c68beb1452b00dac2f73c70a7_c2ltcGxlanNvbi9fc3BlZWR1cHMuYw== 100644 --- a/simplejson/_speedups.c +++ b/simplejson/_speedups.c @@ -2654,7 +2654,7 @@ if (PyInt_Check(int_as_string_bitcount) || PyLong_Check(int_as_string_bitcount)) { static const unsigned int long_long_bitsize = SIZEOF_LONG_LONG * 8; int int_as_string_bitcount_val = (int)PyLong_AsLong(int_as_string_bitcount); - if (int_as_string_bitcount_val > 0 && int_as_string_bitcount_val < long_long_bitsize) { + if (int_as_string_bitcount_val > 0 && int_as_string_bitcount_val < (int)long_long_bitsize) { s->max_long_size = PyLong_FromUnsignedLongLong(1ULL << int_as_string_bitcount_val); s->min_long_size = PyLong_FromLongLong(-1LL << int_as_string_bitcount_val); if (s->min_long_size == NULL || s->max_long_size == NULL) {