Browse Source

support for python 2.5

1.4
clowwindy 12 years ago
parent
commit
0d54102520
  1. 2
      .travis.yml
  2. 10
      local.py
  3. 5
      server.py

2
.travis.yml

@ -1,12 +1,12 @@
language: python
python:
- "2.5"
- "2.6"
- "2.7"
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq libevent-dev python-gevent
- pip install gevent
- pip install simplejson
script:
- python test.py
branches:

10
local.py

@ -22,6 +22,10 @@
from __future__ import with_statement
import sys
if sys.version_info < (2, 6):
import simplejson as json
else:
import json
try:
import gevent, gevent.monkey
@ -147,12 +151,6 @@ class Socks5Server(SocketServer.StreamRequestHandler):
if __name__ == '__main__':
print "Python Version: %s " % '.'.join(str(v) for v in sys.version_info)
if sys.version_info < (2, 6):
import simplejson as json
else:
import json
os.chdir(os.path.dirname(__file__) or '.')
print 'shadowsocks v0.9.4'

5
server.py

@ -20,7 +20,12 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
from __future__ import with_statement
import sys
if sys.version_info < (2, 6):
import simplejson as json
else:
import json
try:
import gevent, gevent.monkey

Loading…
Cancel
Save