From patchwork Fri Mar 22 14:02:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timothy Redaelli X-Patchwork-Id: 1061219 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44Qljr0Sdvz9sSn for ; Sat, 23 Mar 2019 01:03:11 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 07DC118FA; Fri, 22 Mar 2019 14:03:08 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id AC94818AE for ; Fri, 22 Mar 2019 14:02:18 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 58A59148 for ; Fri, 22 Mar 2019 14:02:18 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BE0AD309175F; Fri, 22 Mar 2019 14:02:17 +0000 (UTC) Received: from aldebaran.drizzt.lan (dhcp19-189-71.ntdv.lab.eng.bos.redhat.com [10.19.189.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9DC1C60857; Fri, 22 Mar 2019 14:02:16 +0000 (UTC) From: Timothy Redaelli To: dev@openvswitch.org Date: Fri, 22 Mar 2019 15:02:14 +0100 Message-Id: <3eb845185b04cee2f28c44b340bc2f80e72744b2.1553263261.git.tredaelli@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Fri, 22 Mar 2019 14:02:17 +0000 (UTC) X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Lucian Petrut Subject: [ovs-dev] [PATCH v2] python: Fix package requirements with old setuptools X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Commit 00fcc832d598 ("Update Python package requirements") added a PEP 508 environment marker to install pywin32 on Windows systems. This requires a new setuptools version (>= 20.5), but (at least) RHEL/CentOS7 and Debian Jessie are using an older version of setuptools and so python extension failed to build. This commit adds "extras_require" instead of the PEP 508 environment markers in order to have the conditional dependency of pywin32, but by remaining compatible with the old setuptools versions. CC: Alin Gabriel Serdean CC: Lucian Petrut Fixes: 00fcc832d598 ("Update Python package requirements") Signed-off-by: Timothy Redaelli Acked-by: Alin Gabriel Serdean Signed-off-by: Timothy Redaelli Acked-by: Alin Gabriel Serdean Signed-off-by: Timothy Redaelli --- v1 -> v2: - Use the more compatible PEP 496 environment marker "sys_platform" instead of "platform_system". --- python/setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/setup.py b/python/setup.py index 14814ca4a..b7252800c 100644 --- a/python/setup.py +++ b/python/setup.py @@ -82,8 +82,8 @@ setup_args = dict( ext_modules=[setuptools.Extension("ovs._json", sources=["ovs/_json.c"], libraries=['openvswitch'])], cmdclass={'build_ext': try_build_ext}, - install_requires=['sortedcontainers', - 'pywin32>=1.0;platform_system=="Windows"'], + install_requires=['sortedcontainers'], + extras_require={':sys_platform == "win32"': ['pywin32 >= 1.0']}, ) try: