commit
526e7cdbab
11 changed files with 32 additions and 23 deletions
6
Dockerfile
Normal file
6
Dockerfile
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
FROM python:2.7.11-alpine
|
||||
|
||||
ADD . /sdk
|
||||
WORKDIR sdk
|
||||
RUN python setup.py install
|
||||
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
include LICENSE
|
||||
include requirements.txt
|
||||
include test-requirements.txt
|
||||
include README.md
|
||||
|
|
|
|||
13
Makefile
13
Makefile
|
|
@ -1,13 +0,0 @@
|
|||
test:prepare
|
||||
venv/bin/python setup.py test
|
||||
|
||||
clean:
|
||||
rm -rf venv build dist *.egg-info
|
||||
find . -name '*.pyc' -delete
|
||||
|
||||
prepare:clean
|
||||
set -ex
|
||||
virtualenv venv
|
||||
venv/bin/pip install mock
|
||||
venv/bin/pip install -r requirements.txt
|
||||
venv/bin/python setup.py install
|
||||
3
docker-compose.test.yml
Normal file
3
docker-compose.test.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
sut:
|
||||
build: .
|
||||
command: python setup.py test
|
||||
|
|
@ -25,7 +25,7 @@ from dockercloud.api.utils import Utils
|
|||
from dockercloud.api.events import Events
|
||||
from dockercloud.api.nodeaz import AZ
|
||||
|
||||
__version__ = '1.0.3'
|
||||
__version__ = '1.0.4'
|
||||
|
||||
dockercloud_auth = os.environ.get('DOCKERCLOUD_AUTH')
|
||||
basic_auth = auth.load_from_file("~/.docker/config.json")
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@ class StreamingAPI(BasicObject):
|
|||
on_message=self._on_message,
|
||||
on_error=self._on_error,
|
||||
on_close=self._on_close)
|
||||
ws.run_forever(ping_interval=5, ping_timeout=5, *args, **kwargs)
|
||||
ws.run_forever(ping_interval=10, ping_timeout=5, *args, **kwargs)
|
||||
|
||||
|
||||
class StreamingLog(StreamingAPI):
|
||||
|
|
@ -329,7 +329,7 @@ class StreamingLog(StreamingAPI):
|
|||
on_message=self._on_message,
|
||||
on_error=self._on_error,
|
||||
on_close=self._on_close)
|
||||
ws.run_forever(ping_interval=5, ping_timeout=5, *args, **kwargs)
|
||||
ws.run_forever(ping_interval=10, ping_timeout=5, *args, **kwargs)
|
||||
|
||||
|
||||
class Exec(StreamingAPI):
|
||||
|
|
@ -348,4 +348,4 @@ class Exec(StreamingAPI):
|
|||
on_message=self._on_message,
|
||||
on_error=self._on_error,
|
||||
on_close=self._on_close)
|
||||
ws.run_forever(ping_interval=5, ping_timeout=5, *args, **kwargs)
|
||||
ws.run_forever(ping_interval=10, ping_timeout=5, *args, **kwargs)
|
||||
|
|
|
|||
|
|
@ -39,4 +39,4 @@ class Events(StreamingAPI):
|
|||
on_message=self._on_message,
|
||||
on_error=self._on_error,
|
||||
on_close=self._on_close)
|
||||
ws.run_forever(ping_interval=5, ping_timeout=5, *args, **kwargs)
|
||||
ws.run_forever(ping_interval=10, ping_timeout=5, *args, **kwargs)
|
||||
|
|
|
|||
2
hooks/push
Executable file
2
hooks/push
Executable file
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
echo "Skipping push the image"
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
backports.ssl-match-hostname==3.4.0.2
|
||||
future==0.15.0
|
||||
requests==2.7.0
|
||||
six==1.9.0
|
||||
websocket-client==0.32.0
|
||||
websocket-client==0.37.0
|
||||
|
|
|
|||
14
setup.py
14
setup.py
|
|
@ -4,6 +4,13 @@ import re
|
|||
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
requirements =[
|
||||
"future >= 0.15.0, < 1",
|
||||
"requests >= 2.5.2, < 3",
|
||||
"six >= 1.3.0, < 2",
|
||||
"websocket-client >= 0.32.0, < 1"
|
||||
]
|
||||
|
||||
|
||||
def read(*parts):
|
||||
path = os.path.join(os.path.dirname(__file__), *parts)
|
||||
|
|
@ -19,15 +26,16 @@ def find_version(*file_paths):
|
|||
return version_match.group(1)
|
||||
raise RuntimeError('Unable to find version string.')
|
||||
|
||||
with open('./test-requirements.txt') as test_reqs_txt:
|
||||
test_requirements = [line for line in test_reqs_txt]
|
||||
|
||||
with open('requirements.txt') as f:
|
||||
install_requires = f.read().splitlines()
|
||||
|
||||
setup(
|
||||
name="python-dockercloud",
|
||||
version=find_version('dockercloud', '__init__.py'),
|
||||
packages=find_packages(),
|
||||
install_requires=install_requires,
|
||||
install_requires=requirements,
|
||||
tests_require=test_requirements,
|
||||
provides=['docker'],
|
||||
include_package_data=True,
|
||||
author="Docker, Inc.",
|
||||
|
|
|
|||
3
test-requirements.txt
Normal file
3
test-requirements.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
mock==1.0.1
|
||||
coverage==4.0.3
|
||||
nose==1.3.7
|
||||
Loading…
Add table
Add a link
Reference in a new issue