mirror of https://github.com/docker/docker-py.git
Added .gitignore, proper packaging, updated setup.py, cleaned up commented code
This commit is contained in:
parent
76e846d4c9
commit
5daf7bcc99
|
@ -0,0 +1,5 @@
|
|||
build
|
||||
dist
|
||||
*.egg-info
|
||||
*.pyc
|
||||
|
|
@ -0,0 +1 @@
|
|||
from client import Client
|
|
@ -14,12 +14,11 @@ class Client(requests.Session):
|
|||
return self.base_url + path
|
||||
|
||||
def _result(self, response, json=False):
|
||||
# FIXME
|
||||
if response.status_code != 200:
|
||||
response.raise_for_status()
|
||||
if json:
|
||||
return response.json()
|
||||
return response
|
||||
return response.text
|
||||
|
||||
def _container_config(self, image, command, hostname=None, user=None, detach=False,
|
||||
stdin_open=False, tty=False, mem_limit=0, ports=None, environment=None, dns=None,
|
||||
|
@ -401,14 +400,6 @@ class BuilderClient(object):
|
|||
|
||||
self.config['Cmd'] = None
|
||||
self.merge_config(self.config, config)
|
||||
# res = self.client.post(self.client._url('/images/getCache'), {
|
||||
# 'Id': self.image,
|
||||
# 'Config': config
|
||||
# })
|
||||
# if res.status_code != 200 and res.status_code != 404:
|
||||
# res.raise_for_status()
|
||||
# elif res.status_code != 404:
|
||||
# self.image = res.json().get('Id', self.image)
|
||||
container = self.run()
|
||||
|
||||
self.config['Cmd'] = cmd
|
8
setup.py
8
setup.py
|
@ -1,6 +1,6 @@
|
|||
#/usr/bin/env python
|
||||
import os
|
||||
from setuptools import setup, find_packages
|
||||
from setuptools import setup
|
||||
|
||||
ROOT_DIR = os.path.dirname(__file__)
|
||||
SOURCE_DIR = os.path.join(ROOT_DIR)
|
||||
|
@ -8,10 +8,10 @@ SOURCE_DIR = os.path.join(ROOT_DIR)
|
|||
test_requirements = []
|
||||
setup(
|
||||
name="docker-py",
|
||||
version='0.0.1',
|
||||
version='0.0.2',
|
||||
description="Python client for Docker.",
|
||||
packages=find_packages(),
|
||||
install_requires=[] + test_requirements,
|
||||
packages=['docker'],
|
||||
install_requires=['requests'] + test_requirements,
|
||||
zip_safe=False,
|
||||
classifiers=['Development Status :: 3 - Alpha',
|
||||
'Environment :: Other Environment',
|
||||
|
|
Loading…
Reference in New Issue