Path: csiph.com!news.freedyn.net!open-news-network.org!aioe.org!bofh.it!news.nic.it!robomod From: Michael Hudson-Doyle Newsgroups: linux.debian.maint.python Subject: Re: Packaging with 2to3 Date: Tue, 19 Dec 2017 01:50:01 +0100 Message-ID: References: X-Original-To: Ole Streicher X-Mailbox-Line: From debian-python-request@lists.debian.org Tue Dec 19 00:45:09 2017 Old-Return-Path: X-Amavis-Spam-Status: No, score=-9.99 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, HTML_MESSAGE=2, LDO_WHITELIST=-5, MURPHY_DRUGS_REL8=0.02, RCVD_IN_DNSWL_HI=-5, T_RP_MATCHES_RCVD=-0.01] autolearn=ham autolearn_force=no X-Policyd-Weight: using cached result; rate: -7 X-Google-Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=O9bg9YpCL5RgJCYMkov6On0yjuR0rN3Ykf4VV7h8rKI=; b=qRRI3H1Mncqwix0Sm7P1xXDQR+PgjJDB0xjSWq6K1NY5UrMmI95onloMWo482EbGv/ yymctG95d/sxglEDc5BU1jqBxXHpYx8kRiYkf7ZAxXC03KDQWo8A7peijyI5Yi3GM6sE 5qQQ4CsiE9WMk45errbOaWsD614n2vgWZsHMM7sB9jDqZtQXVb1z+0WIBoMcifkxJv3g VU54yHHmyO/PktFyih6J01pOYbiWghWK86F7Zq3zm9BKsq+cAz8lkoaZvGXCANl96AFz 1NBeXdeRewPSszWQfIPtaNXJLisf18t8jWYhyPuKq66r0h88CPM8Ox18K6qFLj134NC1 nRzA== X-Gm-Message-State: AKGB3mJIxVZ5xz+CYmHNvQmYadmdQSEgeExdqbn+sKXRbfiSpctDiaqV MCSTe3ehsAtWkEK4ZmSf1X2ZjNwr7jvbyNIK3v2j6c06X63lb7mHey4k/+qL6eAa6NTWD6Zgu5G xJIKcqUfW80LsdtQdNVRXOTl+qj8p+Hc+UNmoWWgnmdoAvfLHAKMvHIMMFCPi X-Received: by 10.223.134.184 with SMTP id 53mr2153381wrx.17.1513643292782; Mon, 18 Dec 2017 16:28:12 -0800 (PST) X-Google-SMTP-Source: ACJfBov1RB9AaOkREzndZwQsrkfhnIgdi6yOyNKEeuCeqB+plnwadQO1W49mo9/VwmgHQ57DCMITD40aOGjVs4ZAh8I= X-Received: by 10.223.134.184 with SMTP id 53mr2153360wrx.17.1513643292488; Mon, 18 Dec 2017 16:28:12 -0800 (PST) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="001a1146c642c411350560a68a03" X-Mailing-List: archive/latest/15410 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/CAJ8wqtePmBKD24R4sWuhJA+kR9x7a8aVtrQOa=eHqzpVsyGxuQ@mail.gmail.com Approved: robomod@news.nic.it Lines: 44 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Cc: debian-python X-Original-Date: Tue, 19 Dec 2017 13:28:11 +1300 X-Original-Message-ID: X-Original-References: <87wp1jenho.fsf@debian.org> Xref: csiph.com linux.debian.maint.python:10015 --001a1146c642c411350560a68a03 Content-Type: text/plain; charset="UTF-8" On 19 December 2017 at 10:26, Ole Streicher wrote: > Hi, > > I want to create a package (pyraf, #711038) for both Python2 and > Python3. While the package itself is still not Python 3 compatible, > upstream says that running through 2to3 will make it; however the > resulting code is not Python 2 compatible anymore. > > Is there a way to instruct pybuild to run the Python 3 code through > 2to3? python-urwid does this, by passing use_2to3 to the distutils setup() function, I guess you could patch it to do the same. Cheers, mwh --001a1146c642c411350560a68a03 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On 19 December 2017 at 10:26, Ole Streicher <olebole@debian.org&g= t; wrote:
Hi,

I want to create a package (pyraf, #711038) for both Python2 and
Python3. While the package itself is still not Python 3 compatible,
upstream says that running through 2to3 will make it; however the
resulting code is not Python 2 compatible anymore.

Is there a way to instruct pybuild to run the Python 3 code through
2to3?

python-urwid does this, by passing us= e_2to3 to the distutils setup() function, I guess you could patch it to do = the same.

Cheers,
mwh
<= /div> --001a1146c642c411350560a68a03--