Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #8615

Best practice for adding python3 version to existing module with helper programs?

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Neil Muller <drnlmuller+python@gmail.com>
Newsgroups linux.debian.maint.python
Subject Best practice for adding python3 version to existing module with helper programs?
Date Fri, 24 Jun 2016 00:50:02 +0200
Message-ID <rNlBE-8bD-1@gated-at.bofh.it> (permalink)
X-Mailbox-Line From debian-python-request@lists.debian.org Thu Jun 23 22:42:10 2016
Old-Return-Path <drnlmuller@gmail.com>
X-Amavis-Spam-Status No, score=-2.798 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HK_RANDOM_ENVFROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=no autolearn_force=no
X-Policyd-Weight using cached result; rate: -7
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to; bh=TgTkarmqO6CJdGEBEYFiGN/HIZUICFYrdCWRJMtsNU0=; b=EEFdVL6gSONOz2WFQzL2lnG92CdWlvTs5MNHO4hHRSQl3sIGTJX4i7JHpJSeoyMTm0 ai7oiELnD92fKWd0tx0CmrWVPJoojKWK4f0wX7vO/cnZYWKtPRtSHVuTgBHYPWZgffYZ xAryh1f80dRrdpx3nYXMMsbWP+2xiUgdyl76ECHwKHypin5y+bF6b6ZvZ3OagHYEwYkB QpEuB3briiG0IZysEcA+pUpMBOPh1OzRhYWTK4vNP/Fz9fiYdb018ZhKaiiyZqTHhFuj b9nguzW4p3yGkh/q5JiBn9WBnQVuBWoXAA4xJnydWZuql+h4UNO6Iz31Ewc+WDmy9xXh lBVw==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=TgTkarmqO6CJdGEBEYFiGN/HIZUICFYrdCWRJMtsNU0=; b=QZbo7RIVoPQ+v4YMJKlj/KLEXVcAtXsD1GH7SA0zJeN8oWbQydJQNdsim3W00PCtyx QmrWRA/QYewshDEe10lqJoon0zxLbwsBo+MapIrvlg+41M0RDmCLwefx4M3SR4rq08W7 wlPLVYlS+mqPQYvY95AxYUrldjojC0o3zBV6yQhNmpF2xBJEgmeD8KWRc5cXEyg6FtDn nE4LpK8HGz/yVvgQ6995YFEwmrWbPUhuJGboNgAV5hQlss8LXPCvk1r2lGitqt3t0Zxw 3E4Dy7moCUXf9U53fWmFquwVjsEvTAPc0e31PhzIYopSns8QwZnONG09bX90n8GwiXbr jKlg==
X-Gm-Message-State ALyK8tID5yxK6F99ay+AQQ1Oe5QdAK3bDELESKT0LjT6XQ3RHv+b+uCldyRvOPuJ9pKScM4knov9hLm4Iltf5A==
X-Received by 10.194.68.4 with SMTP id r4mr596740wjt.77.1466720785723; Thu, 23 Jun 2016 15:26:25 -0700 (PDT)
MIME-Version 1.0
Sender robomod@news.nic.it
X-Google-Sender-Auth 0TFLSKDeRW5w6lZ4W9zopgMGVL8
Content-Type text/plain; charset=UTF-8
X-Mailing-List <debian-python@lists.debian.org> archive/latest/13948
List-ID <debian-python.lists.debian.org>
List-URL <https://lists.debian.org/debian-python/>
List-Archive https://lists.debian.org/msgid-search/CAPzz3hbj+CnrtZ2WXB92BNtRk2PRfORoKdwdWNd868gtH0Rh6w@mail.gmail.com
Approved robomod@news.nic.it
Lines 34
Organization linux.* mail to news gateway
X-Original-Date Fri, 24 Jun 2016 00:26:25 +0200
X-Original-Message-ID <CAPzz3hbj+CnrtZ2WXB92BNtRk2PRfORoKdwdWNd868gtH0Rh6w@mail.gmail.com>
X-Original-Sender drnlmuller@gmail.com
Xref csiph.com linux.debian.maint.python:8615

Show key headers only | View raw


I'm working on packaging the latest version of sqlobject, which adds
supprt for python 3, and I'm unsure of how best to handle the helper
applications that ship as part of the package. The helper applications
will work with both python2 and python3, so it's not clear to me how
to apply the advice given in [1], and I'd ideally want the helper
programs available regardless of which version of the module is
installed.

Looking at some other packages in the archive, there seem to be
several approaches used to solve similar problems

a) Bundle the application in both python2 and python3 version and use
alternatives to manage the version (docutils and sphinx, for example,
although in those cases the programs are used fairly extensively as
applications)

b) Install multiple copies with different names (foo and foo-py3 and
similar ideas)

c) Replace the helper with a combination shell / python script
(django-admin for example [2]), which is cute.

Is there any consensus on which approach is best? Any advice on the
pitfalls or benefits of the various approachs? Other tricks I've
missed?

Thanks

[1] https://wiki.debian.org/Python/LibraryStyleGuide

[2] https://anonscm.debian.org/cgit/python-modules/packages/python-django.git/tree/debian/django-admin

-- 
Neil Muller

Back to linux.debian.maint.python | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Best practice for adding python3 version to existing module with  helper programs? Neil Muller <drnlmuller+python@gmail.com> - 2016-06-24 00:50 +0200
  Re: Best practice for adding python3 version to existing module with helper programs? Clint Byrum <spamaps@debian.org> - 2016-06-24 01:30 +0200
  Re: Best practice for adding python3 version to existing module with helper programs? Ben Finney <ben+debian@benfinney.id.au> - 2016-06-24 07:40 +0200
    Re: Best practice for adding python3 version to existing module  with helper programs? Barry Warsaw <barry@debian.org> - 2016-06-24 15:40 +0200

csiph-web