Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 5DA44200C8C for ; Tue, 6 Jun 2017 21:59:00 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 5C601160BD3; Tue, 6 Jun 2017 19:59:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id ABB69160BB7 for ; Tue, 6 Jun 2017 21:58:59 +0200 (CEST) Received: (qmail 55499 invoked by uid 500); 6 Jun 2017 19:58:58 -0000 Mailing-List: contact commits-help@beam.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@beam.apache.org Delivered-To: mailing list commits@beam.apache.org Received: (qmail 55487 invoked by uid 99); 6 Jun 2017 19:58:58 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jun 2017 19:58:58 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B0F38DFF16; Tue, 6 Jun 2017 19:58:58 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: altay@apache.org To: commits@beam.apache.org Date: Tue, 06 Jun 2017 19:58:58 -0000 Message-Id: <66ca5421cb204cd69b6117699070bfb0@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] beam git commit: Do not fail when gen_protos cannot be imported archived-at: Tue, 06 Jun 2017 19:59:00 -0000 Repository: beam Updated Branches: refs/heads/master a05455088 -> 7c608c32a Do not fail when gen_protos cannot be imported Project: http://git-wip-us.apache.org/repos/asf/beam/repo Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/ae3dc5f3 Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/ae3dc5f3 Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/ae3dc5f3 Branch: refs/heads/master Commit: ae3dc5f313ad55f3f86805b9f220bd1cdf1c902b Parents: a054550 Author: Ahmet Altay Authored: Thu Jun 1 11:29:42 2017 -0700 Committer: Ahmet Altay Committed: Tue Jun 6 12:58:26 2017 -0700 ---------------------------------------------------------------------- sdks/python/setup.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/beam/blob/ae3dc5f3/sdks/python/setup.py ---------------------------------------------------------------------- diff --git a/sdks/python/setup.py b/sdks/python/setup.py index 596c8c5..051043b 100644 --- a/sdks/python/setup.py +++ b/sdks/python/setup.py @@ -125,14 +125,18 @@ GCP_REQUIREMENTS = [ # We must generate protos after setup_requires are installed. def generate_protos_first(original_cmd): - # See https://issues.apache.org/jira/browse/BEAM-2366 - # pylint: disable=wrong-import-position - import gen_protos - class cmd(original_cmd, object): - def run(self): - gen_protos.generate_proto_files() - super(cmd, self).run() - return cmd + try: + # See https://issues.apache.org/jira/browse/BEAM-2366 + # pylint: disable=wrong-import-position + import gen_protos + class cmd(original_cmd, object): + def run(self): + gen_protos.generate_proto_files() + super(cmd, self).run() + return cmd + except ImportError: + warnings.warn("Could not import gen_protos, skipping proto generation.") + return original_cmd setuptools.setup(