all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: aurtzy <aurtzy@gmail.com>
To: Gabriel Wicki <gabriel@erlikon.ch>, help-guix@gnu.org
Subject: Re: pyproject build (hatchling) with entry-points
Date: Mon, 2 Dec 2024 18:05:49 -0500	[thread overview]
Message-ID: <daf6e9a5-1e0c-4b1a-999b-7ab0df5ed511@gmail.com> (raw)
In-Reply-To: <dw7rbbh2wrzkgf65zrmfujnfve3rfcpb33ox6tgwhwfdegtn7y@cln7jwhzinuc>

Hi gabber,

On 12/2/24 16:46, Gabriel Wicki wrote:
> Hi there!
> 
> I have created a Python application that seems to build just fine (using
> a pyproject.toml file and the hatchling build system, by invoking
> `python3 -m build`), including script entrypoints and everything.
> 
> Unfortunately I am not as lucky with my Guix packaging attempts.  My
> Python project creates a wheel and a tar.gz dist file with the
> corresponding entry_points.txt file, but the pyproject-build-system's
> create-entrypoints phase does not seem to pick it up.  Making the guix
> build fail I see that no entry_points.txt makes its way into the build
> process.  Am I doing it wrongly?  Am I missing something?  Is this a
> known issue?
> 
> Thanks for any and all pointers leading me further down the path
> gabber
> 

I worked on packaging some software with pyproject-build-system recently and may 
have encountered a similar issue with a fix you can try.

My conclusion was that pyproject-build-system expects a certain format when 
parsing entrypoints, and drops any that do not match it. In my case, the 
entrypoint in my pyproject.toml appeared to be ignored because a colon ":" is 
always expected in the format. My original intention was for the module itself 
to be executed, but the build system seems to only accept entrypoints that call 
a function via a format like "MODULE[.SUBMODULE]:FUNCTION".

If you want to have a look at the code itself and the exact regexp(s), the 
parsing for entrypoints happens in (guix build pyproject-build-system): 
<https://git.savannah.gnu.org/cgit/guix.git/tree/guix/build/pyproject-build-system.scm#n284>

Cheers,

aurtzy


      reply	other threads:[~2024-12-03  0:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-02 21:46 pyproject build (hatchling) with entry-points Gabriel Wicki
2024-12-02 23:05 ` aurtzy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=daf6e9a5-1e0c-4b1a-999b-7ab0df5ed511@gmail.com \
    --to=aurtzy@gmail.com \
    --cc=gabriel@erlikon.ch \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.