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


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

Re: entry-point script and private module install directory

From Piotr Ożarowski <piotr@debian.org>
Newsgroups linux.debian.maint.python, linux.debian.devel.mentors
Subject Re: entry-point script and private module install directory
Date 2016-05-11 20:00 +0200
Message-ID <rxGAp-4yw-7@gated-at.bofh.it> (permalink)
References <rxEIi-2LV-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Cross-posted to 2 groups.

Show all headers | View raw


[Ghislain Vaillant, 2016-05-11]
> Dear all,
> 
> I have a package (pyfr), which is meant to be used as a command-line
> application only.
> 
> The main script (pyfr) is installed via setuptools'
> entry_points['console_scripts'], which generates the entry-point
> automatically and places it under /usr/bin. However, when I install the
> implementation module in a private location, such as /usr/share/pyfr,
> the entry-point cannot find the module and load the application.
> 
> Right now, the module is installed in the dist-packages location,
> although it is not intended to be public. It was just the easiest
> solution to start with at the time.
> 
> What is the standard way to circumvent this? Do other packages use custom

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
-- 
Piotr Ożarowski                         Debian GNU/Linux Developer
www.ozarowski.pl          www.griffith.cc           www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645

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


Thread

entry-point script and private module install directory Ghislain Vaillant <ghisvail@gmail.com> - 2016-05-11 18:10 +0200
  Re: entry-point script and private module install directory Piotr Ożarowski <piotr@debian.org> - 2016-05-11 20:00 +0200
    Re: entry-point script and private module install directory Piotr Ożarowski <piotr@debian.org> - 2016-05-11 20:20 +0200
    Re: entry-point script and private module install directory Ghislain Vaillant <ghisvail@gmail.com> - 2016-05-12 10:30 +0200
      Bug in pybuild's handling of --install-lib? [Was: Re: entry-point  script and private module install directory] Ghislain Vaillant <ghisvail@gmail.com> - 2016-05-12 13:30 +0200
        Re: Bug in pybuild's handling of --install-lib? [Was: Re:  entry-point script and private module install directory] Piotr Ożarowski <piotr@debian.org> - 2016-05-12 14:20 +0200
          Re: Bug in pybuild's handling of --install-lib? [Was: Re: entry-point  script and private module install directory] Ghislain Vaillant <ghisvail@gmail.com> - 2016-05-12 15:00 +0200

csiph-web