Skip to content

Commit bf9ecd3

Browse files
committed
Add latest version of ujson
1 parent 808d078 commit bf9ecd3

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

.DS_Store

12 KB
Binary file not shown.

setup.py

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,25 @@
11
#!/usr/bin/env python
22
from setuptools import find_packages, setup
3+
import os
4+
import sys
35
import versioneer
46

57
README = open('README.rst', 'r').read()
68

79

10+
install_requires = [
11+
'future>=0.14.0; python_version<"3"',
12+
'futures; python_version<"3.2"',
13+
]
14+
15+
if sys.version_info[0] == 2:
16+
if os.name != 'nt':
17+
install_requires.append('ujson<=1.35')
18+
else:
19+
install_requires.append('ujson>=2')
20+
21+
22+
823
setup(
924
name='python-jsonrpc-server',
1025

@@ -31,11 +46,7 @@
3146
# your project is installed. For an analysis of "install_requires" vs pip's
3247
# requirements files see:
3348
# https://packaging.python.org/en/latest/requirements.html
34-
install_requires=[
35-
'future>=0.14.0; python_version<"3"',
36-
'futures; python_version<"3.2"',
37-
'ujson<=1.35; platform_system!="Windows"',
38-
],
49+
install_requires=install_requires,
3950

4051
# List additional groups of dependencies here (e.g. development
4152
# dependencies). You can install these using the following syntax,

test/test_streams.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# pylint: disable=redefined-outer-name
33
from io import BytesIO
44
import os
5+
import sys
56
import mock
67
import pytest
78

@@ -79,7 +80,7 @@ def test_writer(wfile, writer):
7980
'params': {}
8081
})
8182

82-
if os.name == 'nt':
83+
if os.name == 'nt' and sys.version_info[0] == 2:
8384
assert wfile.getvalue() == (
8485
b'Content-Length: 49\r\n'
8586
b'Content-Type: application/vscode-jsonrpc; charset=utf8\r\n'

0 commit comments

Comments
 (0)