mirror of https://github.com/docker/compose.git
Report Python and OpenSSL versions in --version output
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com> Conflicts: compose/cli/utils.py
This commit is contained in:
parent
686c25d50f
commit
93a846db31
|
@ -10,7 +10,6 @@ import sys
|
||||||
from docker.errors import APIError
|
from docker.errors import APIError
|
||||||
import dockerpty
|
import dockerpty
|
||||||
|
|
||||||
from .. import __version__
|
|
||||||
from .. import legacy
|
from .. import legacy
|
||||||
from ..project import NoSuchService, ConfigurationError
|
from ..project import NoSuchService, ConfigurationError
|
||||||
from ..service import BuildError, CannotBeScaledError, NeedsBuildError
|
from ..service import BuildError, CannotBeScaledError, NeedsBuildError
|
||||||
|
@ -20,7 +19,7 @@ from .docopt_command import NoSuchCommand
|
||||||
from .errors import UserError
|
from .errors import UserError
|
||||||
from .formatter import Formatter
|
from .formatter import Formatter
|
||||||
from .log_printer import LogPrinter
|
from .log_printer import LogPrinter
|
||||||
from .utils import yesno
|
from .utils import get_version_info, yesno
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -104,7 +103,7 @@ class TopLevelCommand(Command):
|
||||||
"""
|
"""
|
||||||
def docopt_options(self):
|
def docopt_options(self):
|
||||||
options = super(TopLevelCommand, self).docopt_options()
|
options = super(TopLevelCommand, self).docopt_options()
|
||||||
options['version'] = "docker-compose %s" % __version__
|
options['version'] = get_version_info()
|
||||||
return options
|
return options
|
||||||
|
|
||||||
def build(self, project, options):
|
def build(self, project, options):
|
||||||
|
|
|
@ -5,6 +5,9 @@ import datetime
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import platform
|
import platform
|
||||||
|
import ssl
|
||||||
|
|
||||||
|
from .. import __version__
|
||||||
|
|
||||||
|
|
||||||
def yesno(prompt, default=None):
|
def yesno(prompt, default=None):
|
||||||
|
@ -120,3 +123,11 @@ def is_mac():
|
||||||
|
|
||||||
def is_ubuntu():
|
def is_ubuntu():
|
||||||
return platform.system() == 'Linux' and platform.linux_distribution()[0] == 'Ubuntu'
|
return platform.system() == 'Linux' and platform.linux_distribution()[0] == 'Ubuntu'
|
||||||
|
|
||||||
|
|
||||||
|
def get_version_info():
|
||||||
|
return '\n'.join([
|
||||||
|
'docker-compose version: %s' % __version__,
|
||||||
|
"%s version: %s" % (platform.python_implementation(), platform.python_version()),
|
||||||
|
"OpenSSL version: %s" % ssl.OPENSSL_VERSION,
|
||||||
|
])
|
||||||
|
|
Loading…
Reference in New Issue