Path: csiph.com!goblin2!goblin.stu.neva.ru!gothmog.csi.it!bofh.it!news.nic.it!robomod From: Ghislain Vaillant Newsgroups: linux.debian.maint.python,linux.debian.devel.mentors Subject: Bug in pybuild's handling of --install-lib? [Was: Re: entry-point script and private module install directory] Date: Thu, 12 May 2016 13:30:02 +0200 Message-ID: References: X-Mailbox-Line: From debian-python-request@lists.debian.org Thu May 12 11:27:09 2016 Old-Return-Path: X-Amavis-Spam-Status: No, score=-7.679 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, FREEMAIL_FROM=0.001, LDO_WHITELIST=-5, MURPHY_DRUGS_REL8=0.02, RCVD_IN_DNSWL_LOW=-0.7] autolearn=unavailable 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=subject:references:from:to:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=O1oYCuVO62r0+hhvAYpBeW1joO3ea7jk5YeDuhY6kLA=; b=eiDoHBaBE9V7OEoK4EKvtyYuGMeIBTVA6FV1mqR82auV1SQsmop64xKz+0xD7X7VWo 7/Qu3juo/RkRxBq6B5ah0z3RZ3YN3BwnL00bi8KTxysxL73pHx/tQ0jpEx7fLYHU630v LHUOi92P18Xc9DUKpNQ/BTWFJ/y5CC8rra7TZJ7KT36akgjOtQDIj6dkW3fYpY3gJr66 AFvrCMrbrUwbhQVzj7nD7UcJfcyR9166KJQipIeRzdAVeGcO3q1vxc3fLaH9+b302Nto LdY5+Kf0GplzsnGiim9n+HLcuOyCNalLJRHjHVWInGrV4dO7O7UugDqNutyQygi2d7jy rMZg== X-Google-Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:references:from:to:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=O1oYCuVO62r0+hhvAYpBeW1joO3ea7jk5YeDuhY6kLA=; b=dKenmRi6kJF07zjBb6Ts9z0PklxTcA0xu2K1nRUDATiCdV5c8COUWoHc0qvdegSr3/ 5vCNxneQrijF/kNsMEFMShF0JuInqcl6VINgha2wYkoueDLGEMw+gEj2X44Ye8g3fi7g ru6jwkQWGx7zNx8Z9FANGmkf2OMF8Ykx9HApa3AbcwU8pfDj7jIFFnuD0EnIoNVlf4uf W/TiA3beI5u8WtnwfkSA532uiqcdseC+T4s1Pqgb6T41CHrAIeK3RaXTXowmVLRt2d24 /8uNdy9PGLu/Enkg6o0Lsq7Z7Su/GQdIDrt9bMvZlZLonLl1LTJAm3766spe0LprAp+J R20A== X-Gm-Message-State: AOPr4FWP8ttdEpEId1JXU7MgOyt2SiS+Cw+uoEH7VRD0JO3QDwj+rhq/pl6idMrVhM+4TA== X-Received: by 10.28.17.211 with SMTP id 202mr9314191wmr.59.1463051404657; Thu, 12 May 2016 04:10:04 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.7.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Mailing-List: archive/latest/13852 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/5734648B.6030500@gmail.com Approved: robomod@news.nic.it Lines: 70 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Thu, 12 May 2016 12:10:03 +0100 X-Original-Message-ID: <5734648B.6030500@gmail.com> X-Original-References: <57335528.2070405@gmail.com> <20160511175539.GS2764@sar0.p1otr.com> <57343D31.2040707@gmail.com> Xref: csiph.com linux.debian.maint.python:8523 linux.debian.devel.mentors:36067 On 12/05/16 09:22, Ghislain Vaillant wrote: > On 11/05/16 18:55, Piotr Ożarowski wrote: >> you can create a wrapper or patch /usr/bin script to >> sys.path.append('/usr/share/pyfr') but the easiest solution is to >> install the script to /usr/share/pyfr/ (if the module is "pyfr" as well, >> simply rename the script to "run" or any other name) and then symlink it >> to /usr/bin/pyfr) >> >> override_dh_auto_install: >> dh_auto_install -- --install-lib=/usr/share/pyfr/ >> mv debian/pyfr/usr/bin/pyfr debian/pyfr/usr/share/pyfr/run >> >> and add "/usr/share/pyfr/run /usr/bin/pyfr" to debian/pyfr.links > > Thanks Piotr, that's the solution I have been looking for. > > Ghis Actually, on second look, Piotr's solution currently fails: d/rules: export PYBUILD_DESTDIR=$(CURDIR)/debian/tmp [...] override_dh_auto_install: dh_auto_install -- --install-lib=/usr/share/pyfr mv $(PYBUILD_DESTDIR)/usr/bin/pyfr $(PYBUILD_DESTDIR)/usr/share/pyfr/run build log: dh_auto_install -- --install-lib=/usr/share/pyfr install -d debian/pyfr install -d debian/pyfr-doc pybuild --install -i python{version} -p 3.5 --install-lib=/usr/share/pyfr --dir . --dest-dir /<>/debian/tmp usage: pybuild [ACTION] [BUILD SYSTEM ARGS] [DIRECTORIES] [OPTIONS] pybuild: error: unrecognized arguments: --install-lib=/usr/share/pyfr Whereas this succeeds: d/rules: export PYBUILD_DESTDIR=$(CURDIR)/debian/tmp export PYBUILD_INSTALL_ARGS=--install-lib=/usr/share/pyfr [...] override_dh_auto_install: dh_auto_install mv $(PYBUILD_DESTDIR)/usr/bin/pyfr $(PYBUILD_DESTDIR)/usr/share/pyfr/run build log: dh_auto_install install -d debian/pyfr install -d debian/pyfr-doc pybuild --install -i python{version} -p 3.5 --dir . --dest-dir /<>/debian/tmp I: pybuild base:184: /usr/bin/python3 setup.py install --root /<>/debian/tmp --install-lib=/usr/share/pyfr running install running build running build_py running install_lib [...] Is this a bug in pybuild or am I missing something?