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


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

Re: Amend Debian Python Proposal to Include More Python Metadata?

Path csiph.com!news.freedyn.net!aioe.org!bofh.it!news.nic.it!robomod
From Donald Stufft <donald@stufft.io>
Newsgroups linux.debian.maint.python
Subject Re: Amend Debian Python Proposal to Include More Python Metadata?
Date Fri, 22 Jan 2016 17:00:03 +0100
Message-ID <qTMhZ-62g-15@gated-at.bofh.it> (permalink)
References <qTopk-6qy-11@gated-at.bofh.it> <qTLYC-5Vz-11@gated-at.bofh.it>
X-Mailbox-Line From debian-python-request@lists.debian.org Fri Jan 22 15:55:47 2016
Old-Return-Path <donald@stufft.io>
X-Amavis-Spam-Status No, score=-12.7 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FOURLA=0.1, LDO_WHITELIST=-5, MURPHY_DRUGS_REL8=0.02, PGPSIGNATURE=-5, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=ham autolearn_force=no
X-Policyd-Weight using cached result; rate: -7
Dkim-Signature v=1; a=rsa-sha1; c=relaxed/relaxed; d=stufft.io; h=cc :content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=ibcAd E8gEpkDb5wifC3zMenKLO8=; b=M6gUx4imAzvz0iUGxMGBI0beFKQUYO6UAmpx/ EaWwNoiemKUvFTACBgonT5es/rQ1jCRCcgTwzKK97NEtvYsgv5ogrxmv4B1cj33I hjIEzkyMrmIbWC95nGeOvx1HzCjqoWar9AaEwVGX9x/5rJhueeks9X5LiKN+7g+3 wTTMTQ=
Dkim-Signature v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=ibcAdE8gEpkDb5wifC3zMenKLO8=; b=ohS/7 p4Fgkm28Ts1LxTBFIUu/hMAcR9w7Z/JmwJVSg775eom607L0+T0TfUHeSGxJZKIj 7waxExHdfEzSPKi8nih2PlvUNfwP15Vld2nqNsaGUg49Mf+W1q46DFAH/k1vsKBV 5C93L2nkDrloiL5I/gD+Mac429+Q9ZPsjk2MXE=
X-Sasl-Enc wEy0rJY0wLEaW+ZX2Q/M66pAs9mRmo6xn6Rmi6FsTh0A 1453478116
MIME-Version 1.0 (Mac OS X Mail 9.2 \(3112\))
Content-Type multipart/signed; boundary="Apple-Mail=_B5DF92A8-A543-4FC4-BCDB-7AA464D96D56"; protocol="application/pgp-signature"; micalg=pgp-sha512
X-PGP-Agent GPGMail 2.6b2
X-Mailer Apple Mail (2.3112)
X-Mailing-List <debian-python@lists.debian.org> archive/latest/13439
List-ID <debian-python.lists.debian.org>
List-URL <https://lists.debian.org/debian-python/>
List-Archive https://lists.debian.org/msgid-search/E54A8A20-09D4-4D04-BE78-C43E860761A5@stufft.io
Approved robomod@news.nic.it
Lines 79
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Cc debian-python@lists.debian.org
X-Original-Date Fri, 22 Jan 2016 10:54:54 -0500
X-Original-Message-ID <E54A8A20-09D4-4D04-BE78-C43E860761A5@stufft.io>
X-Original-References <AF6B8D2B-28CC-419A-96DF-180E235DAE60@stufft.io> <20160122153607.GE11588@sar0.p1otr.com>
Xref csiph.com linux.debian.maint.python:8116

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

> On Jan 22, 2016, at 10:36 AM, Piotr Ożarowski <piotr@debian.org> wrote:
> 
> to be honest, I still don't know what you're asking for. What do you
> want us to do? Patch 2.7's distutils?

Essentially, ensure that setuptools not distutils is used in a setup.py. There are generally three kinds of setup.py files:

1) Ones that use setuptools unconditionally - These ones you just leave alone, they are already correct and you should already have a build depends on python-setuptools.
2) Ones that conditionally use setuptools - These ones you just need to satisfy whatever condition the setup.py uses to enable setuptools. Typically this is just checking if setuptools is importable but sometimes they use environment variables or similar.
3) Ones that use distutils unconditionally - These ones you switch to making them use setuptools instead of distutils.

Now, that’s the high level overview, there’s an easier, more automatic way that could maybe just be added to pybuild (Not sure exactly how pybuild works) where instead of invoking the setup.py as:

    python setup.py install (or whatever commands/args you’re passing)

You do it as (taken from pip):

    python -c "import setuptools, tokenize;__file__='$PWD/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))” install (or whatever commands/args you’re passing).

The thing is kind of ugly, but that will install things using setuptools (just like pip does) regardless of if it imports setuptools or distutils in it’s setup.py file.


-----------------
Donald Stufft
PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA

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


Thread

Amend Debian Python Proposal to Include More Python Metadata? Donald Stufft <donald@stufft.io> - 2016-01-21 15:30 +0100
  Re: Amend Debian Python Proposal to Include More Python Metadata? Paul Tagliamonte <paultag@debian.org> - 2016-01-21 15:50 +0100
    Re: Amend Debian Python Proposal to Include More Python Metadata? Donald Stufft <donald@stufft.io> - 2016-01-21 16:10 +0100
      Re: Amend Debian Python Proposal to Include More Python Metadata? Scott Kitterman <debian@kitterman.com> - 2016-01-21 17:00 +0100
  Re: Amend Debian Python Proposal to Include More Python Metadata? Piotr Ożarowski <piotr@debian.org> - 2016-01-22 16:40 +0100
    Re: Amend Debian Python Proposal to Include More Python Metadata? Donald Stufft <donald@stufft.io> - 2016-01-22 17:00 +0100
      Re: Amend Debian Python Proposal to Include More Python Metadata? Piotr Ożarowski <piotr@debian.org> - 2016-01-22 17:20 +0100
        Re: Amend Debian Python Proposal to Include More Python Metadata? Paul Tagliamonte <paultag@debian.org> - 2016-01-22 17:50 +0100
          Re: Amend Debian Python Proposal to Include More Python Metadata? Piotr Ożarowski <piotr@debian.org> - 2016-01-22 18:20 +0100
        Re: Amend Debian Python Proposal to Include More Python Metadata? Donald Stufft <donald@stufft.io> - 2016-01-22 18:00 +0100
        Re: Amend Debian Python Proposal to Include More Python Metadata? Piotr Ożarowski <piotr@debian.org> - 2016-01-22 18:40 +0100
      Re: Amend Debian Python Proposal to Include More Python Metadata? Scott Kitterman <debian@kitterman.com> - 2016-01-22 18:00 +0100
        Re: Amend Debian Python Proposal to Include More Python Metadata? Donald Stufft <donald@stufft.io> - 2016-01-22 18:20 +0100
          Re: Amend Debian Python Proposal to Include More Python Metadata? Scott Kitterman <debian@kitterman.com> - 2016-01-22 18:50 +0100
            Re: Amend Debian Python Proposal to Include More Python Metadata? Fred Drake <fred@fdrake.net> - 2016-01-22 19:40 +0100
              Re: Amend Debian Python Proposal to Include More Python Metadata? Fred Drake <fred@fdrake.net> - 2016-01-22 19:50 +0100
                Re: Amend Debian Python Proposal to Include More Python Metadata? Scott Kitterman <debian@kitterman.com> - 2016-01-22 20:00 +0100
              Re: Amend Debian Python Proposal to Include More Python Metadata? Scott Kitterman <debian@kitterman.com> - 2016-01-22 19:50 +0100
      Re: Amend Debian Python Proposal to Include More Python Metadata? Scott Kitterman <debian@kitterman.com> - 2016-01-23 09:20 +0100
        Re: Amend Debian Python Proposal to Include More Python Metadata? Scott Kitterman <debian@kitterman.com> - 2016-01-23 09:30 +0100
  Re: Amend Debian Python Proposal to Include More Python Metadata? Barry Warsaw <barry@debian.org> - 2016-01-22 23:40 +0100
    Re: Amend Debian Python Proposal to Include More Python Metadata? Donald Stufft <donald@stufft.io> - 2016-01-23 00:00 +0100
      Re: Amend Debian Python Proposal to Include More Python Metadata? Barry Warsaw <barry@debian.org> - 2016-01-23 00:10 +0100
        Re: Amend Debian Python Proposal to Include More Python Metadata? Donald Stufft <donald@stufft.io> - 2016-01-23 00:20 +0100
      Re: Amend Debian Python Proposal to Include More Python Metadata? Scott Kitterman <debian@kitterman.com> - 2016-01-23 00:10 +0100
        Re: Amend Debian Python Proposal to Include More Python Metadata? Donald Stufft <donald@stufft.io> - 2016-01-23 00:30 +0100
          Re: Amend Debian Python Proposal to Include More Python Metadata? Scott Kitterman <debian@kitterman.com> - 2016-01-23 01:20 +0100
            Re: Amend Debian Python Proposal to Include More Python Metadata? Donald Stufft <donald@stufft.io> - 2016-01-23 02:00 +0100
          pip as distutils/setuptools/setup.py wrapper Piotr Ożarowski <piotr@debian.org> - 2016-01-26 19:30 +0100

csiph-web