Patchwork setup: exclude vendored futures package on Python 3

login
register
mail settings
Submitter Yuya Nishihara
Date Sept. 14, 2018, 1:59 p.m.
Message ID <96bffce40f5b98d3b378.1536933571@mimosa>
Download mbox | patch
Permalink /patch/34640/
State Accepted
Headers show

Comments

Yuya Nishihara - Sept. 14, 2018, 1:59 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1536931382 -32400
#      Fri Sep 14 22:23:02 2018 +0900
# Node ID 96bffce40f5b98d3b378c19de2de72fee8653c21
# Parent  053aa673947f0af7d5176dece016e2ebb7c93847
setup: exclude vendored futures package on Python 3

The vendored future can't live on Python 3.
Pulkit Goyal - Sept. 14, 2018, 2:13 p.m.
On Fri, Sep 14, 2018 at 5:01 PM Yuya Nishihara <yuya@tcha.org> wrote:

> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1536931382 -32400
> #      Fri Sep 14 22:23:02 2018 +0900
> # Node ID 96bffce40f5b98d3b378c19de2de72fee8653c21
> # Parent  053aa673947f0af7d5176dece016e2ebb7c93847
> setup: exclude vendored futures package on Python 3
>
> The vendored future can't live on Python 3.
>

Queued this. Many thanks!

Patch

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -818,8 +818,6 @@  packages = ['mercurial',
             'mercurial.thirdparty.attr',
             'mercurial.thirdparty.cbor',
             'mercurial.thirdparty.cbor.cbor2',
-            'mercurial.thirdparty.concurrent',
-            'mercurial.thirdparty.concurrent.futures',
             'mercurial.thirdparty.zope',
             'mercurial.thirdparty.zope.interface',
             'mercurial.utils',
@@ -832,6 +830,9 @@  packages = ['mercurial',
             'hgext.largefiles', 'hgext.lfs', 'hgext.narrow',
             'hgext.zeroconf', 'hgext3rd',
             'hgdemandimport']
+if sys.version_info[0] == 2:
+    packages.extend(['mercurial.thirdparty.concurrent',
+                     'mercurial.thirdparty.concurrent.futures'])
 
 common_depends = ['mercurial/bitmanipulation.h',
                   'mercurial/compat.h',