Path: csiph.com!goblin2!goblin1!goblin.stu.neva.ru!news.albasani.net!weretis.net!feeder1.news.weretis.net!newsfeed.CARNet.hr!news.spin.it!bofh.it!news.nic.it!robomod From: Robert Collins Newsgroups: linux.debian.maint.python Subject: Re: Application libraries private, Distutils metadata available for console scripts and introspection Date: Wed, 02 Sep 2015 13:30:02 +0200 Message-ID: References: X-Original-To: Karsten Hilbert X-Mailbox-Line: From debian-python-request@lists.debian.org Wed Sep 2 11:22:21 2015 Old-Return-Path: X-Amavis-Spam-Status: No, score=-7.701 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, LDO_WHITELIST=-5, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001] autolearn=ham autolearn_force=no X-Policyd-Weight: DYN_NJABL=SKIP(0) NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_BL_NJABL=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .robertcollins. - helo: .mail-ig0-f171.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -7 X-Google-Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=yPdjPQ2pcKb9pD3tOGj77mFE3IdsOLaiZdNWf1Eg2VE=; b=ZHqs+/4cgTQTuaCgLgQ1NzMM9LNxkDfHJMVqI6fXI8RGBRXh2ca9SJKSrcRMMoLiOx qfqqp4e6spkP/XJ7UMv3Y4XyR0FQley63yuMlSpxfu0hkuF+XDkEi+1LuKsKZ2H63zXS p36f+BAVcZI3lZEVMpQIYduCZ4MR7P7s+9DNT9MYFLRzLOfiQg3nyvRTNxgc1Ct757AU F2U+ZDqlyCZ1bGZ+byYK06CCRrPOiLDFngTKXlnM2Ra1AGmSIqy/SNA+RUOtgV6HMaSG 2cWe7f+I+RzLCgB7wpJOyro5TxdmZ0FEUrq3IgJjXqdgvYCFcVM+FNSXkdpNlJ7yVWX1 hOEA== X-Gm-Message-State: ALoCoQnQyAqOXsGHnU8FWWEqFK/EWA1M/mo0wsV0CmW0L4y8EMKlgExGl9BGKLeZ5jqqebvcg1JP MIME-Version: 1.0 X-Received: by 10.50.137.5 with SMTP id qe5mr2829801igb.91.1441192924788; Wed, 02 Sep 2015 04:22:04 -0700 (PDT) X-Originating-IP: [122.57.98.209] Content-Type: text/plain; charset=UTF-8 X-Mailing-List: archive/latest/12539 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/CAJ3HoZ06x83PdtJO1Gb5pXobBtbAxQ6sLmFrZEbzv0DsXJq_ng@mail.gmail.com Approved: robomod@news.nic.it Lines: 47 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Cc: Debian Python X-Original-Date: Wed, 2 Sep 2015 23:22:04 +1200 X-Original-Message-ID: X-Original-References: <85bndmc0ln.fsf@benfinney.id.au> <85k2s99q1h.fsf@benfinney.id.au> <20150902091923.GA2390@hermes.hilbert.loc> Xref: csiph.com linux.debian.maint.python:7232 On 2 September 2015 at 21:19, Karsten Hilbert wrote: > On Wed, Sep 02, 2015 at 09:06:01PM +1200, Robert Collins wrote: > >> > Ben Finney writes: >> >> > According to Robert's earlier message, that means the Distutils >> > metadata file needs to be not in the application's private directory, >> > but in a directory on the Python module search path. That seems odd to >> > me, since this is not amodule import being done. >> >> So this is perhaps the disconnect: I did not say the metadata should >> move: it should be in the private directory - it has to be adjacent to >> the packages/modules its describing, since if it is present but the >> package/module is not that is at the very best confusing for tools >> like pip. >> >> That private directory must be on the python search path > > Maybe I'm a bit dense but isn't that what OP very much > DOESN'T want to _happen_ ? They don't want to have to alter the PYTHONPATH variable as far as I can tell, but that is only one of a number of mechanisms to get a directory on the search path. > Are you, by implication, saying that that's not _possible_ ? I suspect so. >> when running the application (or the modules can't be imported). > > That reason doesn't hold -- the application can be written to > (or told to) "know" where to look and manipulate sys.path > accordingly (regardless of whether that's considered a good > idea or not). If sys.path is altered by the application to put the private directory on the search path, then my assertion (that it needs to be on the path) would be satisfied, and I'd expect it to work. -Rob -- Robert Collins Distinguished Technologist HP Converged Cloud