Return-Path: X-Original-To: apmail-ambari-dev-archive@www.apache.org Delivered-To: apmail-ambari-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F0DFA11C07 for ; Mon, 7 Jul 2014 14:54:33 +0000 (UTC) Received: (qmail 57067 invoked by uid 500); 7 Jul 2014 14:54:33 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 57038 invoked by uid 500); 7 Jul 2014 14:54:33 -0000 Mailing-List: contact dev-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list dev@ambari.apache.org Received: (qmail 57025 invoked by uid 99); 7 Jul 2014 14:54:33 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jul 2014 14:54:33 +0000 Date: Mon, 7 Jul 2014 14:54:33 +0000 (UTC) From: "subin (JIRA)" To: dev@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AMBARI-6294) Python client is broken when pycurl isn't installed MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMBARI-6294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14053721#comment-14053721 ] subin commented on AMBARI-6294: ------------------------------- We dont use pip to install ambari_client. the test cases are run via maven (command > mvn test) To install ambari_client. you need to build the source code , >mvn versions:set -DnewVersion=1.6.0-SNAPSHOT >mvn -B clean install package rpm:rpm -DnewVersion=1.6.0-SNAPSHOT -DskipTests -Pcentos6 -Dpython.ver="python >= 2.6" -Preplaceurl then >rpm -ivh If pycurl or other dependencies are not available we can add them to the rpm preinstall scripts. We use CentOS/RHEL and yum update brings in most of the python libraries on to our build box. But I am interested to know more about your pip support changes, > Python client is broken when pycurl isn't installed > --------------------------------------------------- > > Key: AMBARI-6294 > URL: https://issues.apache.org/jira/browse/AMBARI-6294 > Project: Ambari > Issue Type: Bug > Components: client > Affects Versions: 1.6.0 > Reporter: Greg Hill > Assignee: subin > > If you don't have pycurl installed, trying to use the client causes a lot of problems. This line in http_client.py is at fault: > try: > import pycurl > except ImportError: > from mock.mock import MagicMock > pycurl = MagicMock() > There are a few problems here: > 1. The tests should do the mocking, it shouldn't be done automatically when running outside of tests. > 2. mock.mock does not appear to be a valid module. I can't install it via pip. Did you mean 'from mock import MagicMock'? > 3. There is no dependency set on either pycurl or mock.mock, so using pip to install ambari-client does not install it in a working state. -- This message was sent by Atlassian JIRA (v6.2#6252)