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

  • Done
  • quality assurance status badge
Details
3 participants
  • Efraim Flashner
  • jgart
  • Maxime Devos
Owner
unassigned
Submitted by
jgart
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 2021 12:12
(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 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.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYHljCRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7uaWAQCoWPHsBDN+XHFSX8XISf0YKfwP
u0sVtvuyJWGN94yy6gD/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 2021 11:12
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 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.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYHqmeRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7nXUAP47rDVWMzDSGCCxQ/RK092glEAw
dz64M8C1aTcq/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-references
guix/build-system/gnu.scm: #:disallowed-references
guix/build-system/gnu.scm: #:disallowed-references
guix/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 2021 18:19
(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 +0200
In-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.2
MIME-Version: 1.0


--=-McKjzYiatrfw5oPiKPaE
Content-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=
ences
later.

Greetings,
Maxime.

--=-McKjzYiatrfw5oPiKPaE
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYHsKThccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7pmyAQCMQyq3eiNzygd/sLLnf0DEEbCh
AY+2nQ9Mo/760dtQ9gEAocupjBjvoAMop9FJsKbE2fa8itrXTPN7EXwFwtJBQQk=
=mXAY
-----END PGP SIGNATURE-----

--=-McKjzYiatrfw5oPiKPaE--


-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYHsKiBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7pZ1AQDTZOM1CZYLawjWNUf7nB5a/ub/
W6VXdVRsmv45R8mEhwD+OHfANJo/WBxZwAwuxGH9QzNVLkmvF5mJu2qzKTnh6Ac=
=ul0y
-----END PGP SIGNATURE-----


E
E
Efraim Flashner wrote on 22 Jul 2021 10:53
Re: [bug#47815] [PATCH 1/3] gnu: music: python-abjad: Abjad Improvements.
(name . jgart)(address . jgart@dismail.de)
YPkyI51RXnB1wLNc@3900XT
Sorry for the long delay! I made a couple of changes:
I added python-abjad as a deprecated package, so it won't break for
anyone who already has it installed.
I sorted python-ply alphabetically when moving it to propagated-inputs.

I also moved lilypond to inputs and removed the now unnecessary
'patch-source phase.

Thanks! Patches pushed.

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmD5MiMACgkQQarn3Mo9
g1EwpA/+II6zM3CWmhfe7XHJDYvt2//kJmboMt/CaqRgKlPE8ZERyKjt4SMkjvh4
RGYB2nfdI/QcLlXTyxH85ZSAz4ui8gzKklr9QQ2iUDL1wLb6ZeP7jrDcBfok4ZSB
Av4dsHD2L9azJdTdlf9n+/SgPdJCOXE0PjnkFQwzFxqsarPb1BKSeBS04WCpKxdi
oU3gGlvEjYPJ5ugSP29+nL3A3jONAHEkS7AviZBOD+1g/HSxb+oAnrErU+lV1jvS
EqzZ7hhQBN214MMjwqhI7TAbmHtkBq8ZvUEdNrvm0dkrB3SZBgUKfhQbg1LZldAZ
1PTLInC0N4Jxun3CvhUZ36RYC9RZshzJ1X1QK5Nu5qAEKaBPUU7PW837UESwSkB5
TAJmjIPfYBt63x2k4WX303JmbQ+LHatX1zM3Jjdh6F2rJwZjMo5kv8mAvJy7wsY3
1J6OLwYV7p/0fKFqgHxxw/GSdRnm93JdSoMj60Cp9WIfiYRXZbI4nqJr4jQMF9Nb
r6oEgvVY4i9HBWtoX+g0jyFP5jPG05oIllQaelu0bS+WM5CKB0bILvcTnIbfanQC
4J8fabkPiVz/GSRBRUkUYoCetMXlACNVbiP9WGe3d6yulCiuaP8IWNZ2MvVVeYP+
l2kekEqdNTfTwTkVCi0+WC+iNe+7GVYZ5UT1VJKIe7hyVn1Cn1s=
=VAQf
-----END PGP SIGNATURE-----


Closed
?