From: Tanguy LE CARROUR <tanguy@bioneland.org>
To: Guix <guix-devel@gnu.org>, Lars-Dominik Braun <lars@6xq.net>
Subject: Re: Questions regarding Python packaging
Date: Tue, 26 Jan 2021 08:21:22 +0100 [thread overview]
Message-ID: <1611645480.1t06ie9pyf.astroid@melmoth.none> (raw)
In-Reply-To: <1611303651.35tpgtn1z1.astroid@melmoth.none>
Excerpts from Tanguy LE CARROUR's message of January 22, 2021 9:38 am:
> Excerpts from Tanguy LE CARROUR's message of January 6, 2021 4:32 pm:
>> Excerpts from Lars-Dominik Braun's message of January 5, 2021 11:25 am:
>>>> So, I've tried packaging `python-keyring` with those two…
>>>>
>>>> `pep517` keeps on trying to download dependencies, which won't work.
>>>>
>>>> `build` crashes with "ZIP does not support timestamps before 1980",
>>>> which, I guess is related to the fact that everything in the store is
>>>> timestamped to January 1st 1970.
>>> have you been looking into a python-build-system using `build`[1]? I’ve
>>> had the same issue with egg versions set to 0.0.0 and think in the long
>>> run moving to a PEP 517-style build is the way forward.
>>
>> I agree! Unfortunately, I haven't had much time (so far) to work on it! :-(
>>
>> I'll revive the thread as soon as I've made progress…
>
> Done! :-)
> I've eventually succeeded in ("properly") packaging a software managed
> with Poetry. And I've learned quite a lot on the way!
Just for the sake of having it documented somewhere, here is the
relevant part of the `guix.scm` file:
```
(define-public nowty
(package
(name "nowty")
(version (string-append %pyproject-version "+" %git-commit))
(source (local-file %source-dir #:recursive? #t))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'build
(lambda* (#:key #:allow-other-keys)
(substitute* "pyproject.toml"
(((string-append "version = \"" ,%pyproject-version "\"" ))
(string-append "version = \"" ,version "\"")))))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(invoke "python" "-m" "pip" "install"
"--no-dependencies" "--no-build-isolation" "--prefix" out "."))))
(replace 'check
(lambda* (#:key inputs outputs #:allow-other-keys)
(add-installed-pythonpath inputs outputs)
(invoke "python" "-m" "invoke" "test.unit"))))))
(native-inputs
`(("python-invoke" ,python-invoke-patched)
("python-mamba" ,python-mamba)
("python-poetry-core" ,python-poetry-core)
("python-robber" ,python-robber)
("python-termcolor" ,python-termcolor)))
(propagated-inputs
`(("python-mpd2" ,python-mpd2)
("python-typer" ,python-typer)))
(synopsis "Music notification daemon for MPD")
(description "A music notification daemon that monitors songs being played by MPD
and displays notifications with the song's details.")
(home-page "http://projects.bioneland.org/nowty")
(license license:gpl3+)))
```
--
Tanguy
next prev parent reply other threads:[~2021-01-26 7:22 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-08 14:27 Questions regarding Python packaging Tanguy Le Carrour
2020-11-08 17:05 ` Leo Famulari
2020-11-10 8:35 ` Tanguy Le Carrour
2020-11-08 20:43 ` Michael Rohleder
2020-11-10 8:30 ` Tanguy Le Carrour
2020-11-09 16:54 ` Hartmut Goebel
2020-11-10 8:47 ` Tanguy Le Carrour
2020-11-10 8:53 ` Hartmut Goebel
2021-01-05 10:25 ` Lars-Dominik Braun
2021-01-06 15:32 ` Tanguy LE CARROUR
2021-01-22 8:38 ` Tanguy LE CARROUR
2021-01-23 12:34 ` Lars-Dominik Braun
2021-01-24 13:30 ` Tanguy LE CARROUR
2021-01-24 20:54 ` Ryan Prior
2021-01-25 11:47 ` Lars-Dominik Braun
2021-01-25 16:57 ` Ryan Prior
2021-02-05 10:40 ` Hartmut Goebel
2021-05-17 6:24 ` Lars-Dominik Braun
2021-06-06 16:44 ` Tanguy LE CARROUR
2021-06-06 19:44 ` Lars-Dominik Braun
2021-06-22 6:53 ` Removal of Python 2? Hartmut Goebel
2021-06-22 12:41 ` Konrad Hinsen
2021-06-23 15:26 ` Ludovic Courtès
2021-06-23 15:34 ` zimoun
2021-06-23 18:32 ` Konrad Hinsen
2021-06-22 18:02 ` Ryan Prior
2021-06-25 6:37 ` Konrad Hinsen
2021-06-22 7:00 ` Questions regarding Python packaging Hartmut Goebel
2021-06-28 11:59 ` Lars-Dominik Braun
2021-06-28 20:37 ` Hartmut Goebel
2021-06-29 7:20 ` Lars-Dominik Braun
2021-07-06 12:16 ` [bug#46848] " Lars-Dominik Braun
2021-07-07 15:01 ` Hartmut Goebel
2021-01-26 7:21 ` Tanguy LE CARROUR [this message]
2021-01-27 3:43 ` Maxim Cournoyer
2021-01-06 15:37 ` Tanguy LE CARROUR
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1611645480.1t06ie9pyf.astroid@melmoth.none \
--to=tanguy@bioneland.org \
--cc=guix-devel@gnu.org \
--cc=lars@6xq.net \
/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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
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).