Skip to content

Commit e6f16f9

Browse files
author
Pan
committed
Updated embedded server cfg.
Updated docker build images script. Updated travis cfg to use build stage for building packages. Updated readme.
1 parent e109151 commit e6f16f9

File tree

4 files changed

+21
-19
lines changed

4 files changed

+21
-19
lines changed

.travis.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,22 @@ language: python
22
cache: pip
33
notifications:
44
email: false
5-
sudo: required
5+
sudo: false
66
services:
77
- docker
88
python:
9-
- 2.6
109
- 2.7
1110
- 3.4
1211
- 3.5
1312
- 3.6
14-
matrix:
15-
allow_failures:
16-
- python: 2.6
13+
jobs:
14+
include:
15+
- stage: build_packages
16+
python: 3.6
17+
install: skip
18+
script:
19+
- ./docker/build-packages.sh
20+
- ls -ltrh *.{rpm,deb}
1721
addons:
1822
apt:
1923
packages:
@@ -26,8 +30,6 @@ install:
2630
script:
2731
- nosetests
2832
- flake8 ssh2
29-
- docker/build-packages.sh
30-
- ls -ltrh
3133
deploy:
3234
- provider: pypi
3335
on:

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,9 @@ SFTP Read
152152
.. code-block:: python
153153
154154
sftp = session.sftp_init()
155-
fh = sftp.open(<file path>, 0, 0)
156-
with open(<file to write>, 'wb') as local_fh:
157-
for data in fh:
155+
with sftp.open(<remote file to read>, 0, 0) as remote_fh, \
156+
open(<file to write>, 'wb') as local_fh:
157+
for data in remote_fh:
158158
local_fh.write(data)
159159
fh.close()
160160

docker/build-packages.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
#!/bin/bash -xe
22

3-
for x in `ls -1d docker/centos*`; do
3+
for x in `ls -1d docker/{fedora,centos}*`; do
44
name=`echo "$x" | awk -F/ '{print $2}'`
55
dist_num=`echo "$name" | sed -r 's/[a-z]+([0-9]+)/\1/'`
6-
if [[ $dist_num > 20 ]]; then
7-
dist="f${dist_num}"
6+
if [[ $dist_num -gt 20 ]]; then
7+
dist="fc${dist_num}"
88
else
99
dist="el${dist_num}"
1010
fi
11-
echo docker build $x -t $name
12-
echo docker run -v "$(pwd):/src/" "$name" --rpm-dist $dist -s python -t rpm setup.py
11+
docker build $x -t $name
12+
docker run -v "$(pwd):/src/" "$name" --rpm-dist $dist -s python -t rpm setup.py
1313
done
1414

1515
for x in `ls -1d docker/{debian,ubuntu}*`; do
16-
name=`echo "$x" | awk -F/ '{print $2}'`
17-
echo docker build $x -t "$x"
18-
echo docker run -v "$(pwd):/src/" "$name" --iteration $name -s python -t deb setup.py
16+
name=`echo "$x" | awk -F/ '{print $2}' | awk -F. '{print $1}'`
17+
docker build $x -t "$name"
18+
docker run -v "$(pwd):/src/" "$name" --iteration $name -s python -t deb setup.py
1919
done

embedded_server/sshd_config.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Protocol 2
22
UsePAM no
3-
HostbasedAuthentication yes
3+
HostbasedAuthentication no
44
IgnoreUserKnownHosts yes
55
ListenAddress 127.0.0.1
66

0 commit comments

Comments
 (0)