Skip to content

Commit 22965f8

Browse files
author
Pan
committed
Added travis cfg.
Updated source files. Updated setup.py. Updated embedded server
1 parent 74e4948 commit 22965f8

File tree

13 files changed

+147
-375
lines changed

13 files changed

+147
-375
lines changed

.travis.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
language: python
2+
cache: pip
3+
sudo: false
4+
notifications:
5+
email: false
6+
python:
7+
- 2.6
8+
- 2.7
9+
- 3.4
10+
- 3.5
11+
- 3.6
12+
matrix:
13+
allow_failures:
14+
- python: 2.6
15+
addons:
16+
apt:
17+
packages:
18+
- libssh2-1-dev
19+
- openssh-server
20+
install:
21+
- python setup.py build_ext --inplace
22+
- chmod 600 embedded_server/rsa.key
23+
script:
24+
- nosetests

embedded_server/openssh.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def __init__(self, port=2222):
3131
self.server_proc = None
3232

3333
def start_server(self):
34-
cmd = ['/usr/sbin/sshd', '-q', '-D', '-p', str(self.port),
34+
cmd = ['/usr/sbin/sshd', '-D', '-p', str(self.port),
3535
'-h', SERVER_KEY, '-f', SSHD_CONFIG]
3636
server = Popen(cmd)
3737
self.server_proc = server

setup.py

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,41 +21,39 @@
2121
ext = 'pyx' if USING_CYTHON else 'c'
2222
sources = ['ssh2/*.%s' % (ext,)]
2323

24-
extensions = [
25-
Extension('ssh2/*',
26-
sources=sources,
27-
libraries=['ssh2'],
28-
# extra_compile_args=["-O3"],
29-
extra_compile_args=["-ggdb"],
30-
# For conditional compilation
31-
# pyrex_compile_time_env
32-
)
33-
# for ext in extensions
34-
]
3524

36-
if ext == 'c':
37-
sources = glob(sources[0])
38-
# names = [ for s in sources]
25+
if USING_CYTHON:
3926
extensions = [
40-
Extension(sources[i].split('.')[0].replace('/', '.'),
41-
sources=[sources[i]],
27+
Extension('ssh2/*',
28+
sources=sources,
4229
libraries=['ssh2'],
4330
# extra_compile_args=["-O3"],
4431
extra_compile_args=["-ggdb"],
4532
# For conditional compilation
4633
# pyrex_compile_time_env
4734
)
48-
for i in range(len(sources))]
49-
50-
51-
if USING_CYTHON:
35+
# for ext in extensions
36+
]
5237
extensions = cythonize(
5338
extensions,
5439
compiler_directives={'embedsignature': True,
5540
'optimize.use_switch': True,
5641
# 'boundscheck': False,
5742
'wraparound': False,
5843
})
44+
else:
45+
sources = glob(sources[0])
46+
# names = [ for s in sources]
47+
extensions = [
48+
Extension(sources[i].split('.')[0].replace('/', '.'),
49+
sources=[sources[i]],
50+
libraries=['ssh2'],
51+
# extra_compile_args=["-O3"],
52+
extra_compile_args=["-ggdb"],
53+
# For conditional compilation
54+
# pyrex_compile_time_env
55+
)
56+
for i in range(len(sources))]
5957

6058
setup(
6159
name='ssh2-python',

ssh2/agent.c

Lines changed: 7 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)