[PATCH 1/3] gnu: music: python-abjad: Abjad Improvements.

OpenSubmitted by jgart.
Details
2 participants
  • jgart
  • Maxime Devos
Owner
unassigned
Severity
normal
J
(address . guix-patches@gnu.org)(name . Efraim Flashner)(address . efraim@flashner.co.il)
41ef3171abdaaafbfc405e131de5ab68@dismail.de
Hi Guix,
Below are some improvements to the python-abjad package that was merged the other day.
I changed the name to abjad, moved some inputs into their correct place, and improved its description.
best regards,
jgart
M
M
Maxime Devos wrote on 16 Apr 12:12 +0200
(name . Efraim Flashner)(address . efraim@flashner.co.il)
97a0c2631437f698041b40786a4442e0ff4e5432.camel@telenet.be
On Fri, 2021-04-16 at 04:57 +0000, jgart via Guix-patches via wrote:
Toggle quote (6 lines)> Hi Guix,> > Below are some improvements to the python-abjad package that was merged the other day.> > I changed the name to abjad, moved some inputs into their correct place,
Please move 'lilypond' from propagated-inputs to 'inputs', if sanely possible!This avoids polluting the profile with packages the user did notexplicitely request. Of course, abjad still somehow has to findlilypond, so you might need to replace "lilypond" with
(string-append (assoc-ref inputs "lilypond") "/bin/lilypond")
somewhere in python-abjad's source code. You can use substitute*for that.
Greetings,Maxime.
-----BEGIN PGP SIGNATURE-----
iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYHljCRccbWF4aW1lZGV2b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7uaWAQCoWPHsBDN+XHFSX8XISf0YKfwPu0sVtvuyJWGN94yy6gD/b/kbMS+Br81Q7+9R01edC6F8R1Z7wu1rjAB+nqK40gw==MEOw-----END PGP SIGNATURE-----

J
baed24528899846a824662f850a68427@dismail.de
Hi Maxime,
Thank you for the review! I attached a new patch set.
I reverted to Bonface's original idea of having lilypond only as a native input in the package definition.
I prefer this solution in order to solve the problem since it follows upstream's instructions of installing lilypond separately (https://abjad.github.io/first_steps/linux.html),doesn't pollute a guix user's profile with lilypond as you mentioned, and seems a bit cleaner since I don't have to touch the python sources in order to make them find the lilypond input.
If the user wants to produce a pdf then they can just include lilypond in their profile.
What do you think?
best regards,
jgart
ps
This caused me to have to add lilypond as a native-input to abjad-ext-rmakers (47816), abjad-ext-nauert (47817), and abjad-ext-ipython (47818) since those where building successfully before because they had abjad as a propagated input and abjad had lilypond as a propagated input. The above mentioned packages require lilypond for the tests.



April 16, 2021 6:12 AM, "Maxime Devos" <maximedevos@telenet.be> wrote:
Toggle quote (20 lines)> On Fri, 2021-04-16 at 04:57 +0000, jgart via Guix-patches via wrote:> >> Hi Guix,>> >> Below are some improvements to the python-abjad package that was merged the other day.>> >> I changed the name to abjad, moved some inputs into their correct place,> > Please move 'lilypond' from propagated-inputs to 'inputs', if sanely possible!> This avoids polluting the profile with packages the user did not> explicitely request. Of course, abjad still somehow has to find> lilypond, so you might need to replace "lilypond" with> > (string-append (assoc-ref inputs "lilypond") "/bin/lilypond")> > somewhere in python-abjad's source code. You can use substitute*> for that.> > Greetings,> Maxime.
M
M
Maxime Devos wrote on 17 Apr 11:12 +0200
9d82233085aadf8a622f2956e5fc8c51a134c7ca.camel@telenet.be
jgart schreef op vr 16-04-2021 om 17:59 [+0000]:
Toggle quote (7 lines)> Hi Maxime,> > Thank you for the review! I attached a new patch set. > > I reverted to Bonface's original idea of having lilypond only as a native input> in the package definition.
If you do that, make sure "abjad" does not retain a reference to lilypond,as otherwise when cross-compiling, "abjad" will use a lilypond built for theincorrect architecture. You can use #:disallowed-references ,lilypond for this.
(TODO: there should be a #:disallowed-refences/native variant. But#:disallowed-references will suffice for now.)
I'm currently occupied with some other things, so I can't review your revisedpatches yet.
Greetings,Maxime.
-----BEGIN PGP SIGNATURE-----
iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYHqmeRccbWF4aW1lZGV2b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7nXUAP47rDVWMzDSGCCxQ/RK092glEAwdz64M8C1aTcq/RqE3AD/Ud5cQen6c7Dp9NgItQYYKbYwkDFXaVhcVqNCiegqbAg==I4KT-----END PGP SIGNATURE-----

J
cf068a797061090cb9d1422e4e3b0363@dismail.de
Hi Maxime,
I tried your suggestion but it fails with the following exception:
Backtrace:
...In guix/build-system/python.scm: 162:0 3 (python-build _ _ _ #:tests? _ #:test-target _ # _ # _ # …)In ice-9/boot-9.scm: 1669:16 2 (raise-exception _ #:continuable? _) 1669:16 1 (raise-exception _ #:continuable? _) 1669:16 0 (raise-exception _ #:continuable? _)
ice-9/boot-9.scm:1669:16: In procedure raise-exception:Unrecognized keyword: #:disallowed-references
It looks like python-build-system might not support #:disallowed-references.
Is that correct?
all the best,
jgart
ps
I did a quick search for it with ripgrep and it seems like only gnu, meson, and glib-or-gtk support it currently:
rg "\#:disallowed-references" -t lisp | rg build-system
guix/build-system/meson.scm: #:disallowed-referencesguix/build-system/gnu.scm: #:disallowed-referencesguix/build-system/gnu.scm: #:disallowed-referencesguix/build-system/glib-or-gtk.scm: #:disallowed-references

April 17, 2021 5:12 AM, "Maxime Devos" <maximedevos@telenet.be> wrote:
Toggle quote (21 lines)> jgart schreef op vr 16-04-2021 om 17:59 [+0000]:> >> Hi Maxime,>> >> Thank you for the review! I attached a new patch set.>> >> I reverted to Bonface's original idea of having lilypond only as a native input>> in the package definition.> > If you do that, make sure "abjad" does not retain a reference to lilypond,> as otherwise when cross-compiling, "abjad" will use a lilypond built for the> incorrect architecture. You can use #:disallowed-references ,lilypond for this.> > (TODO: there should be a #:disallowed-refences/native variant. But> #:disallowed-references will suffice for now.)> > I'm currently occupied with some other things, so I can't review your revised> patches yet.> > Greetings,> Maxime.
M
M
Maxime Devos wrote on 17 Apr 18:19 +0200
(address . 47815@debbugs.gnu.org)
9ba505f46ad8c87b6fbe411568e03afbb56dea97.camel@telenet.be
I accidentally forgot to keep 47815@debbugs.gnu.org in To:.
Message-ID: <7988a3c09cc5efb9265b28483f036b1508514f67.camel@telenet.be>Subject: Re: [bug#47815] [PATCH 1/3] gnu: music: python-abjad: Abjad Improvements.From: Maxime Devos <maximedevos@telenet.be>To: jgart <jgart@dismail.de>Date: Sat, 17 Apr 2021 18:18:22 +0200In-Reply-To: <cf068a797061090cb9d1422e4e3b0363@dismail.de>References: <9d82233085aadf8a622f2956e5fc8c51a134c7ca.camel@telenet.be> <97a0c2631437f698041b40786a4442e0ff4e5432.camel@telenet.be> <41ef3171abdaaafbfc405e131de5ab68@dismail.de> <baed24528899846a824662f850a68427@dismail.de> <cf068a797061090cb9d1422e4e3b0363@dismail.de>Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-McKjzYiatrfw5oPiKPaE"User-Agent: Evolution 3.34.2MIME-Version: 1.0

--=-McKjzYiatrfw5oPiKPaEContent-Type: text/plain; charset="UTF-8"Content-Transfer-Encoding: quoted-printable
jgart schreef op za 17-04-2021 om 16:10 [+0000]:
Toggle quote (9 lines)> Hi Maxime,>=20> I tried your suggestion but it fails with the following exception:>=20> Backtrace:>=20> ...> In guix/build-system/python.scm:> 162:0 3 (python-build _ _ _ #:tests? _ #:test-target _ # _ # _ # =E2=
=80=A6)
Toggle quote (9 lines)> In ice-9/boot-9.scm:> 1669:16 2 (raise-exception _ #:continuable? _)> 1669:16 1 (raise-exception _ #:continuable? _)> 1669:16 0 (raise-exception _ #:continuable? _)>=20> ice-9/boot-9.scm:1669:16: In procedure raise-exception:> Unrecognized keyword: #:disallowed-references>=20> It looks like python-build-system might not support #:disallowed-referenc=
es.
Toggle quote (3 lines)>=20> Is that correct?
That indeed seems to be the case.For now, you can run =E2=80=98guix gc --references $(guix build abjad)=E2==80=99.The output should not contain lilypond.I'll see about adding #:disallowed-references and #:disallowed-native-refer=enceslater.
Greetings,Maxime.
--=-McKjzYiatrfw5oPiKPaEContent-Type: application/pgp-signature; name="signature.asc"Content-Description: This is a digitally signed message partContent-Transfer-Encoding: 7bit
-----BEGIN PGP SIGNATURE-----
iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYHsKThccbWF4aW1lZGV2b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7pmyAQCMQyq3eiNzygd/sLLnf0DEEbChAY+2nQ9Mo/760dtQ9gEAocupjBjvoAMop9FJsKbE2fa8itrXTPN7EXwFwtJBQQk==mXAY-----END PGP SIGNATURE-----
--=-McKjzYiatrfw5oPiKPaE--

-----BEGIN PGP SIGNATURE-----
iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYHsKiBccbWF4aW1lZGV2b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7pZ1AQDTZOM1CZYLawjWNUf7nB5a/ub/W6VXdVRsmv45R8mEhwD+OHfANJo/WBxZwAwuxGH9QzNVLkmvF5mJu2qzKTnh6Ac==ul0y-----END PGP SIGNATURE-----

?