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


Groups > linux.debian.maint.python > #14919 > unrolled thread

can one change the path of generated entry point console_scripts

Started byPhilippe Cerfon <philcerf@gmail.com>
First post2023-02-14 01:40 +0100
Last post2023-02-17 10:00 +0100
Articles 4 — 3 participants

Back to article view | Back to linux.debian.maint.python


Contents

  can one change the path of generated entry point console_scripts Philippe Cerfon <philcerf@gmail.com> - 2023-02-14 01:40 +0100
    Re: can one change the path of generated entry point console_scripts Stefano Rivera <stefanor@debian.org> - 2023-02-15 17:40 +0100
      Re: can one change the path of generated entry point console_scripts Philippe Cerfon <philcerf@gmail.com> - 2023-02-17 03:10 +0100
        Re: can one change the path of generated entry point console_scripts Andrey Rakhmatullin <wrar@wrar.name> - 2023-02-17 10:00 +0100

#14919 — can one change the path of generated entry point console_scripts

FromPhilippe Cerfon <philcerf@gmail.com>
Date2023-02-14 01:40 +0100
Subjectcan one change the path of generated entry point console_scripts
Message-ID<FYRwu-5FJd-3@gated-at.bofh.it>
Hey.

When I use dh-python to build a package that contains a pyproject.toml
and uses python3-setuptools for building like e.g. described here
https://setuptools.pypa.io/en/latest/userguide/entry_point.html

and I use that entry point feature to have a script auto-generated
that calls my main():[project.scripts]
somescript = "package:main"

is it possible to change the path were that script is finally put it
the package (i.e. not ./usr/bin/)?

I tried to look it up in other Debian source packages, but all that I
checked and which contain Python scripts in non-/usr/bin locations
simply put a real file there, and not such a auto-generated one.


Thanks,
Philippe.

[toc] | [next] | [standalone]


#14923

FromStefano Rivera <stefanor@debian.org>
Date2023-02-15 17:40 +0100
Message-ID<FZsZ4-66P7-29@gated-at.bofh.it>
In reply to#14919
Hi Philippe (2023.02.14_00:13:08_+0000)
> When I use dh-python to build a package that contains a pyproject.toml
> and uses python3-setuptools for building like e.g. described here
> https://setuptools.pypa.io/en/latest/userguide/entry_point.html
> 
> and I use that entry point feature to have a script auto-generated
> that calls my main():[project.scripts]
> somescript = "package:main"
> 
> is it possible to change the path were that script is finally put it
> the package (i.e. not ./usr/bin/)?

Just move it somewhere else later in the build? e.g. after dh_install.

/usr/bin is where user-executable scripts should go, unless they belong
in /usr/sbin or /usr/games.

Internal scripts (that will be executed by the full path name) can live
in /usr/share/<packagename> or similar.

SR

-- 
Stefano Rivera
  http://tumbleweed.org.za/
  +1 415 683 3272

[toc] | [prev] | [next] | [standalone]


#14930

FromPhilippe Cerfon <philcerf@gmail.com>
Date2023-02-17 03:10 +0100
Message-ID<FZYmd-6qNN-1@gated-at.bofh.it>
In reply to#14923
Hey Stefano

On Wed, Feb 15, 2023 at 5:37 PM Stefano Rivera <stefanor@debian.org> wrote:
> Just move it somewhere else later in the build? e.g. after dh_install.

I had tried that before, with a debian/mypackage.install file but got
an error that it doesn't find the file.
Then I realized that I cannot use e.g.:
   usr/bin/script    usr/sbin/
but have to use:
   debian/mypackage/usr/bin/script    usr/sbin/
in the .install file.

Is that the right way? Or is there a more proper "way"?


Thanks,
Philippe.

[toc] | [prev] | [next] | [standalone]


#14933

FromAndrey Rakhmatullin <wrar@wrar.name>
Date2023-02-17 10:00 +0100
Message-ID<G04L0-6uJq-1@gated-at.bofh.it>
In reply to#14930
On Fri, Feb 17, 2023 at 02:49:49AM +0100, Philippe Cerfon wrote:
> Hey Stefano
> 
> On Wed, Feb 15, 2023 at 5:37 PM Stefano Rivera <stefanor@debian.org> wrote:
> > Just move it somewhere else later in the build? e.g. after dh_install.
> 
> I had tried that before, with a debian/mypackage.install file but got
That's not what "move it [...] after dh_install" means, it usually means a
manual mv call.

> an error that it doesn't find the file.
> Then I realized that I cannot use e.g.:
>    usr/bin/script    usr/sbin/
Yes, .install is not for moving files between directories inside a
package. Please check its two use cases in dh_install(1).

> but have to use:
>    debian/mypackage/usr/bin/script    usr/sbin/
I don't think this is a good idea.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.maint.python


csiph-web