* Managing python entry-points to discover plugin package with the new pyproject-build-system ?
@ 2024-07-11 13:55 Sebastien Rey-Coyrehourcq
2024-07-12 9:47 ` Simon Tournier
0 siblings, 1 reply; 3+ messages in thread
From: Sebastien Rey-Coyrehourcq @ 2024-07-11 13:55 UTC (permalink / raw)
To: help-guix
Hi, For my lab i actually manage to package the latest version (existing package on guix are old) of python mkdocs static site generator with mkdocs-materials theme. Mkdocs use a yaml entry to call the theme (here mkdocs-material-theme) to use for the website generation. Both project use a pyproject.toml for pip installation. An example of mkdocs.yml that use the material theme : ```yamlsite_name: my site nametheme: name: material``` The name entry run/use python entry-points (https://peps.python.org/pep-0621/#entry-points) to detect theme actually installed with pip in the same context. Entry-point is a common way to install/link package as plugin. Even if my homemade package mkdocs-material is well installed and contain the entry-point.txt into dist-info/entry_points.txt that doesn't work. By looking in the build system of python i found some information about that : I package mkdocs-material using the new pyproject-build-system https://git.savannah.gnu.org/cgit/guix.git/tree/guix/build/pyproject-build-system.scm My problem is that management of entry-points seems not implemented, as line https://git.savannah.gnu.org/cgit/guix.git/tree/guix/build/pyproject-build-system.scm#n61 say. Is there a way to implement this outside of pyproject-build-system, only for this project ? Best regards,SR
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Managing python entry-points to discover plugin package with the new pyproject-build-system ?
2024-07-11 13:55 Managing python entry-points to discover plugin package with the new pyproject-build-system ? Sebastien Rey-Coyrehourcq
@ 2024-07-12 9:47 ` Simon Tournier
2024-07-12 20:07 ` s.rey.coyrehourcq
0 siblings, 1 reply; 3+ messages in thread
From: Simon Tournier @ 2024-07-12 9:47 UTC (permalink / raw)
To: Sebastien Rey-Coyrehourcq, help-guix
Hi,
On Thu, 11 Jul 2024 at 15:55, "Sebastien Rey-Coyrehourcq" <sebastien.rey-coyrehourcq@univ-rouen.fr> wrote:
> Entry-point is a common way to install/link package as
> plugin. Even if my homemade package mkdocs-material is well installed
> and contain the entry-point.txt into dist-info/entry_points.txt that
> doesn't work.
How is the entry-point installed? Have you added a phase that run some
“pip” trick?
Cheers,
simon
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Managing python entry-points to discover plugin package with the new pyproject-build-system ?
2024-07-12 9:47 ` Simon Tournier
@ 2024-07-12 20:07 ` s.rey.coyrehourcq
0 siblings, 0 replies; 3+ messages in thread
From: s.rey.coyrehourcq @ 2024-07-12 20:07 UTC (permalink / raw)
To: Simon Tournier; +Cc: Sebastien Rey-Coyrehourcq, help-guix
Hi,
Le vendredi 12 juillet 2024 à 11:47 AM, Simon Tournier <zimon.toutoune@gmail.com> a écrit :
>
>
> Hi,
>
> On Thu, 11 Jul 2024 at 15:55, "Sebastien Rey-Coyrehourcq" sebastien.rey-coyrehourcq@univ-rouen.fr wrote:
>
> > Entry-point is a common way to install/link package as
> > plugin. Even if my homemade package mkdocs-material is well installed
> > and contain the entry-point.txt into dist-info/entry_points.txt that
> > doesn't work.
>
>
> How is the entry-point installed? Have you added a phase that run some
> “pip” trick?
>
No tricks with pip in my actual scm, i only use `pyproject-build-system` which parse pyproject.toml of mkdocs & mkdocs-material (https://github.com/squidfunk/mkdocs-material/blob/master/pyproject.toml#L77).
I read a little more the builder src and i found there is something about entry-points finally :
https://git.savannah.gnu.org/cgit/guix.git/tree/guix/build/pyproject-build-system.scm#n284
But when i run =pip list= after running =guix shell -m mkdocs-material.scm= neither mkdocs or mkdocs-material packages are listed by pip ...
I miss something, after building the package with pyproject-build-system i also need to install it manually from /gnu/store/xxx with =pip install= ? Perhaps my problem is more that than entry-points ?
The mkdocs-material.scm : https://paste.debian.net/1323079/
Best regards,
SR
> Cheers,
> simon
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-07-14 13:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-11 13:55 Managing python entry-points to discover plugin package with the new pyproject-build-system ? Sebastien Rey-Coyrehourcq
2024-07-12 9:47 ` Simon Tournier
2024-07-12 20:07 ` s.rey.coyrehourcq
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).