Path: csiph.com!au2pb.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.CARNet.hr!news.spin.it!bofh.it!news.nic.it!robomod From: Ben Finney Newsgroups: linux.debian.maint.python Subject: Install libraries to a private directory, with Debhelper, Pybuild, dh_python2, dh_python3 Date: Tue, 01 Sep 2015 03:40:02 +0200 Message-ID: X-Original-To: debian-python@lists.debian.org X-Mailbox-Line: From debian-python-request@lists.debian.org Tue Sep 1 01:39:15 2015 Old-Return-Path: X-Amavis-Spam-Status: No, score=-9.112 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, HEADER_FROM_DIFFERENT_DOMAINS=0.015, LDO_WHITELIST=-5, RCVD_IN_DNSWL_LOW=-0.7, RP_MATCHES_RCVD=-1.427] autolearn=ham autolearn_force=no X-Policyd-Weight: using cached result; rate: -6.1 X-Injected-Via-Gmane: http://gmane.org/ Lines: 49 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: jigong.madmonks.org X-Public-Key-ID: 0xAC128405 X-Public-Key-Fingerprint: 517C F14B B2F3 98B0 CB35 4855 B8B2 4C06 AC12 8405 X-Public-Key-URL: http://www.benfinney.id.au/contact/bfinney-pubkey.asc X-Post-From: Ben Finney User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) Cancel-Lock: sha1:Qj4Z0VkxxOXYf7SPH/fv10qId+c= X-Mailing-List: archive/latest/12526 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/85mvx6c40n.fsf@benfinney.id.au Approved: robomod@news.nic.it Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Tue, 01 Sep 2015 11:38:48 +1000 X-Original-Message-ID: <85mvx6c40n.fsf@benfinney.id.au> X-Original-X-Complaints-To: usenet@ger.gmane.org Xref: csiph.com linux.debian.maint.python:7219 Howdy all, The Python packaging page at the Debian wiki says of private libraries: Private modules should be installed in private directory such as /usr/share/packagename/ or /usr/lib/packagename/ […] Example 2: Python application […] Add these three lines: override_dh_auto_install: python setup.py install --root=debian/charm --install-layout=deb --install-lib=/usr/share/charm --install-scripts=/usr/share/charm override_dh_auto_build: This is the important part, it will tell distutils that we want to use private directory. […] The above lines specify the ‘python’ (version 2) command explicitly. That implies that to install libraries to an application-private directory, we need to abandon autodetection of which Python version to run. The current wisdom seems to be that Pybuild figures most of this out. For the above special case, it would be good to only need to specify the options that are different, letting Pybuild figure out the rest. Should that page be updated to recommend Pybuild? Is this a correct replacement:: PYBUILD_INSTALL_ARGS ?= --install-lib=/usr/share/charm --install-scripts=/usr/share/charm %: dh $@ --with=python3 --buildsystem=pybuild Would that achieve installation of the application's libraries and scripts to a private directory, and remaining conformant to Debian Python policy for everything else? -- \ “It ain't so much the things we don't know that get us in | `\ trouble. It's the things we know that ain't so.” —Artemus Ward | _o__) (1834–1867), U.S. journalist | Ben Finney