[PATCH] gnu: Add adl-submit.py

  • Open
  • quality assurance status badge
Details
3 participants
  • Denis 'GNUtoo' Carikli
  • Sharlatan Hellseher
  • Simon Tournier
Owner
unassigned
Submitted by
Denis 'GNUtoo' Carikli
Severity
normal
D
D
Denis 'GNUtoo' Carikli wrote on 14 Dec 2024 02:25
(address . guix-patches@gnu.org)(name . Denis 'GNUtoo' Carikli)(address . GNUtoo@cyberdimension.org)
fd24792813f33fd5d0eb8733ce4d5c00e40af13b.1734139530.git.GNUtoo@cyberdimension.org
* gnu/packages/calendar.scm (adl-submit.py): New variable.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Change-Id: Icd9438fbaf2c53635989fb8cfb443d2c3e541eff
---
gnu/packages/calendar.scm | 44 +++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)

Toggle diff (73 lines)
diff --git a/gnu/packages/calendar.scm b/gnu/packages/calendar.scm
index 6717db867f..069e3c05ca 100644
--- a/gnu/packages/calendar.scm
+++ b/gnu/packages/calendar.scm
@@ -12,6 +12,7 @@
;;; Copyright © 2020 Peng Mei Yu <pengmeiyu@riseup.net>
;;; Copyright © 2021 Wamm K. D. <jaft.r@outlook.com>
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2024 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -56,6 +57,7 @@ (define-module (gnu packages calendar)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-build)
+ #:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages qt)
#:use-module (gnu packages sphinx)
@@ -65,6 +67,48 @@ (define-module (gnu packages calendar)
#:use-module (gnu packages xml)
#:use-module (srfi srfi-26))
+(define-public adl-submit.py
+ (let ((revision "1")
+ (commit "e20998c17475e64676173828385f22a6d5801240"))
+ (package
+ (name "adl-submit.py")
+ (version (git-version "1.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://framagit.org/agenda-libre/agenda-libre-ruby.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1jpasv7skpbi20674f23kbgw2fj78ywhnd542cwgkc65v2s6s4lh"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:tests? #f ; No tests
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (lambda _
+ (install-file
+ "public/adl-submit.py" (string-append #$output "/bin"))
+ (wrap-program (string-append #$output "/bin/adl-submit.py")
+ `("GUIX_PYTHONPATH" ":"
+ prefix (,(getenv "GUIX_PYTHONPATH")))))))))
+ (inputs (list python python-pycurl))
+ (home-page "https://www.agendadulibre.org")
+ (synopsis "Submit events to the Agenda Du Libre")
+ (description "adl-submit.py is a tool that can be used to submit events
+to any instance of the Agenda Du Libre (a web calendar originally meant for
+free software events). Users can set fields through the command line or
+create an XML that can be submitted with the adl-submit.py tool. While the
+Agenda Du Libre web application is available in multiple languages, most of
+the events on https://www.agendadulibre.org are in French and the
+adl-submit.py tool is only available in French.")
+ (license license:gpl2))))
+
(define-public date
;; We make the same choice as the Arch package maintainer by choosing a
;; recent commit to fix some bugs.

base-commit: 0787a180b3ca64d3958438920ca1b58a2a27fba4
--
2.46.0
S
S
Simon Tournier wrote on 16 Jan 13:27 +0100
87tt9zrlka.fsf@gmail.com
Hi Denis,

CC: Python team because it’s a Python script after all. :-)

On Sat, 14 Dec 2024 at 02:25, Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> wrote:

Toggle quote (2 lines)
> * gnu/packages/calendar.scm (adl-submit.py): New variable.

Cool! Thank you.


Toggle quote (2 lines)
> +(define-public adl-submit.py

[...]

Toggle quote (16 lines)
> + (build-system gnu-build-system)
> + (arguments
> + (list
> + #:tests? #f ; No tests
> + #:phases
> + #~(modify-phases %standard-phases
> + (delete 'configure)
> + (delete 'build)
> + (replace 'install
> + (lambda _
> + (install-file
> + "public/adl-submit.py" (string-append #$output "/bin"))
> + (wrap-program (string-append #$output "/bin/adl-submit.py")
> + `("GUIX_PYTHONPATH" ":"
> + prefix (,(getenv "GUIX_PYTHONPATH")))))))))

Since it “only“ copies ’public/adl-submit.py’, why not rely on
’copy-build-system’ instead?

Cheers,
simon
S
S
Sharlatan Hellseher wrote on 16 Jan 22:11 +0100
[PATCH] gnu: Add adl-submit.py
(address . 74864@debbugs.gnu.org)
87v7ueihw9.fsf@gmail.com
Hi,

I've checked the project on
full featured application where public/adl-submit.py is served by the
web server.

Question of interest, why we need to pack just one script out of the
whole project :-)?

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

iQIzBAEBCgAdFiEEmEeB3micIcJkGAhndtcnv/Ys0rUFAmeJdeYACgkQdtcnv/Ys
0rUTMg/+KLEoPOUvQ0Yr0NHzXrKYMjMGHb3agt/DFLu/+WX4KRAHRN9dfC5uNWyc
T3ImdZfSWXe/HJJMooJTiCZGVrQIdaREEXUeTXYwN5fICq22mzpuua3gTwkDV7IN
/8g4TXTNrVzLMxKRvigCrv/bjs1vnucCiEVTjJmtVSgvdTfiIvSCpd7daiC0vAqx
ZdBzoge7v8ZApqtDF4v6edZe7q583vixxdlJwcYAcyYhHXyFo2DnvE9gimaZrwBa
XnShFsSm/dZhN3Qf3lP2fyER6GSa2vnl2IZ+T3RovdR4rJjxW2II/Y90zcLiuVyw
NmtZSDM9Q/eew0lNUWJ1D2Ye4mgEo5ZxQ5zlvVT4Tmpd+PjfF9+3fUrr25Xc3K3D
BJJ5l/B9piBxbINMIuPe5LqCUyypv9Na+MkM6tb6zeVbbAgyQjQKir0yUCQI9b/9
GHq/JLst8uZ4HXoavUUVXR1uT4yX75bZlaEB602eFMBlYbI5im9sJ+4IfBw9HpRz
hBRWJiXmjzPDovw3Yp+lVKjUUkZaK1Q3F3GeHwyJ2PnlJ1dP4gdaPBajCW+tnOan
49pJTdnExQid30REudlXrwVv3vkghVjEw3l9kp5INkrdd8O2qM9WqtCIqVF4jVNv
10YLYacMZWAJ7KLRvr2kdZlL5hZYAKKI91Wqv127ggp/dI8p4Ps=
=XacG
-----END PGP SIGNATURE-----

D
D
Denis 'GNUtoo' Carikli wrote on 21 Jan 18:18 +0100
[PATCH v2] gnu: Add adl-submit.py
(address . 74864@debbugs.gnu.org)(name . Denis 'GNUtoo' Carikli)(address . GNUtoo@cyberdimension.org)
4eb4ddd710929754ac28abf26f6a850afb59fc70.1737479903.git.GNUtoo@cyberdimension.org
* gnu/packages/calendar.scm (adl-submit.py): New variable.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Change-Id: Icd9438fbaf2c53635989fb8cfb443d2c3e541eff
---
gnu/packages/calendar.scm | 42 +++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)

Toggle diff (78 lines)
diff --git a/gnu/packages/calendar.scm b/gnu/packages/calendar.scm
index 6717db867f2..733ec823ba5 100644
--- a/gnu/packages/calendar.scm
+++ b/gnu/packages/calendar.scm
@@ -12,6 +12,7 @@
;;; Copyright © 2020 Peng Mei Yu <pengmeiyu@riseup.net>
;;; Copyright © 2021 Wamm K. D. <jaft.r@outlook.com>
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2024 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -35,6 +36,7 @@ (define-module (gnu packages calendar)
#:use-module (guix git-download)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix build-system copy)
#:use-module (guix build-system gnu)
#:use-module (guix build-system go)
#:use-module (guix build-system cmake)
@@ -56,6 +58,7 @@ (define-module (gnu packages calendar)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-build)
+ #:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages qt)
#:use-module (gnu packages sphinx)
@@ -65,6 +68,45 @@ (define-module (gnu packages calendar)
#:use-module (gnu packages xml)
#:use-module (srfi srfi-26))
+(define-public adl-submit.py
+ (let ((revision "1")
+ (commit "e20998c17475e64676173828385f22a6d5801240"))
+ (package
+ (name "adl-submit.py")
+ (version (git-version "1.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://framagit.org/agenda-libre/agenda-libre-ruby.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1jpasv7skpbi20674f23kbgw2fj78ywhnd542cwgkc65v2s6s4lh"))))
+ (build-system copy-build-system)
+ (arguments
+ (list
+ #:install-plan
+ #~'(("public/adl-submit.py" "bin/adl-submit.py"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'install 'wrap-script
+ (lambda _
+ (wrap-program (string-append #$output "/bin/adl-submit.py")
+ `("GUIX_PYTHONPATH" ":"
+ prefix (,(getenv "GUIX_PYTHONPATH")))))))))
+ (inputs (list python python-pycurl))
+ (home-page "https://www.agendadulibre.org")
+ (synopsis "Submit events to the Agenda Du Libre")
+ (description "adl-submit.py is a tool that can be used to submit events
+to any instance of the Agenda Du Libre (a web calendar originally meant for
+free software events). Users can set fields through the command line or
+create an XML that can be submitted with the adl-submit.py tool. While the
+Agenda Du Libre web application is available in multiple languages, most of
+the events on https://www.agendadulibre.org are in French and the
+adl-submit.py tool is only available in French.")
+ (license license:gpl2))))
+
(define-public date
;; We make the same choice as the Arch package maintainer by choosing a
;; recent commit to fix some bugs.

base-commit: 309ad9fcdacf732691f0220c4122757d9940b97d
--
2.46.0
D
D
Denis 'GNUtoo' Carikli wrote on 23 Jan 05:33 +0100
Re: [PATCH] gnu: Add adl-submit.py
20250123053302.691863e6@primary_laptop
Toggle quote (1 lines)
> Hi,
Hi,

Toggle quote (2 lines)
> Question of interest, why we need to pack just one script out of the
> whole project :-)?
The issue is that the whole project is a web application that is
deployed at https://www.agendadulibre.org/(it's basically a
calendar for French free software events).

And I'm only interested in packaging a client that connects to that web
application to submit events.

The use case is that I find adl-submit.py really useful as we heavily
depend on adl-submit.py in a French free software user group (Parinux)
that I'm part of, and so I thought that maybe other people than me might
also need it as well (other people from Parinux, people organizing Guix
events in France around Paris because they also publish on the Agenda
du libre, etc).

This website is really central in the free software community in France.

If you need more details on the use case, our workflow at Parinux is
the following: we start by creating a new page with a new event (like
the install Party for the next month) on our SPIP website, usually by
cloning another event (like the install party from the previous month).

We have a custom SPIP extension that generates an xml file that is
compatible with the adl-submit.py tool.

So once the event is published, someone (usually the person
that published the event but not always) downloads that XML and runs
adl-submit.py on her computer to send it to the Agenda du libre.

Then people from the Agenda du libre (it's moderated) accept our event
and it gets published there as well.

So basically we're not really interested in hosting our own Agenda du
libre, we're only interested in sending events its most famous instance.

And at least for us it is crucial because people have very little time
to do such publication, and the Agenda du libre is also kind of
central, and so not publishing there or publishing very late means that
way less people go to the event, which is problematic.

I think that the use cases are relevant here because as I understand
the packages we add to Guix are expected to be maintained somehow, so I
think it makes more sense to add packages that people actually use or
depend on.

Also note that while I heavily depend on this package, I don't know how
many other people do or may want to.

Toggle quote (4 lines)
> I've checked the project on
> <https://framagit.org/agenda-libre/agenda-libre-ruby>, and looks like
> a full featured application where public/adl-submit.py is served by
> the web server.
This is actually the case indeed.

This also complicates things: contributions to adl-submit.py need to
fit into this file because that file is also served by the web
application.

This is why I didn't translate adl-submit.py in English before sending
a patch to add it in Guix.

So for instance I can't simply send a patch to adl-submit that uses
gettext to translate it in English as well because such modification
would make adl-submit.py depend on additional files.

Though maybe once it is packaged in Guix, a patch could still be made
to optionally add internationalization, and once/if it is merged in
adl-submit.py, the Guix package could then be updated to use this
optional internationalization feature, making all that a bit more
useful and easier for people that don't understand French to understand
what all that is about.

Also note that the agendadulibre.org website also works fine in
English, through not everything is translated. This can be relevant for
international conferences that take place in France for instance
(assuming they choose to use the Agenda du libre, as not all
International conferences do that in France).

PS: for some reasons I didn't get your mail, I just replied by
copy-pasting it from debbugs.

Denis.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEeC+d2+Nrp/PU3kkGX138wUF34mMFAmeRxn4ACgkQX138wUF3
4mPOEg//WBX+P49pQ8fVfGezSDKQyIIH1LGSfigoCfgPWQJVldWdeO2KlVtRhWpj
gj6phzboJkRQtnl4eJQ1EDb+nFvEtNj+Zd1kHVHqTV0yDbOAkkgMRjVX6A3aJAU8
Qvjgdq8nR/bvEeMzgiBN6qQPM+2m31zfpUD+nQezr+5GvqwV1lIhWdj3xur+NsPu
uXAjjjgKqIdV6d8PpAaaTLO5pF+l6o06lL6zoFrX8sOK09MPCcVpE5nJky5S2IDE
AGDPXUnZ3xT2ws7MZP7qxVdVHQcj4jIeIbuRxWH6gYtp/ap9K0QGdmIeL585Cuxa
mWB7vt8SW6hr9nXqY+LaVRCmYj0JOFDtSYPL51r+vKV8BXO189ws+lZeH0L995zg
6PXEs442ACrIzXnTaNVnKkN2r0HtFxBa+D1J9Kd6F28GkaUq6bRzoUttxwiIPxkL
wa7LS5txauhrIkHSMnOakjApDp+00FX/6pue4wdOP1HkQ/ubif8GQAt+HNZrt5dm
EX30fFP5uRa644GmuUtVR5Hguk3SMjgUs64zClh2zcGD3YLKBOQ4HLadyfSh3uUE
Vz4jp42oMJHFIpCQckHPj8gsUt7ufKlx1d3rdkWqkHfnQShpaGRmEzFv/ZVD4JxF
AYm/FydnBGYn3O6G5BDWWFkyGgMJgglC4JvJ97UK3Y43Dz2JAPc=
=YUrd
-----END PGP SIGNATURE-----


S
S
Sharlatan Hellseher wrote on 23 Jan 20:33 +0100
[PATCH] gnu: Add adl-submit.py
(address . 74864@debbugs.gnu.org)(address . GNUtoo@cyberdimension.org)
874j1piaud.fsf@gmail.com
Hi,

Toggle quote (4 lines)
> This also complicates things: contributions to adl-submit.py need to
> fit into this file because that file is also served by the web
> application.

What if someone would like to create a proper python package first by
taking that file and preparing pyproject.toml with all dependencies? It
would ease the live both for packaging and maintain, WDYT?

I may prepare the project based on that script, I guess the license
would let us do that, or propose maintainers of
dedicated project with the same reason you described - it would help
make live more bright and shiny.

--
Thanks
Oleg
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEmEeB3micIcJkGAhndtcnv/Ys0rUFAmeSmZoACgkQdtcnv/Ys
0rVJvRAApwSYP8ARg+np1FGcp9dEkGwuG8IRl5mJXxXfxNUe2IszepML9nKZ0jHP
3Md+1XMThg7jsTJBKrA/hm2GJueH/PaDroArbM8Z5LG62hEmVX3Ld5WQUtTrEFam
Mkjxy2zKGrbMbEh99oXrpPYihC4sy9O9b1zKo3Rax2HFO7SK/wmS/v8N8vFchz4E
SG5eTr1Y1ipSfj6wMAecUg6ZhSOYmhUj05vlzWpFZuVSfEkWtca/W0m/6vRG5Vyu
+8Ht8xp01bMxwlAofSSOnoJfpzu0RRn77cphcbE/1OuJqq0t5zRI86YDWhD6tL+P
So6BbTuH8rdv5vwTGs1mGwCo88kN3qVmsLlk0pfDXZqYrR8Z1gz7vfSMUTZBpx/j
i169ZbKcnszANSIyQWjcQHhZJTqoAAR8JfSiTLKbKX4W+ZFynLlwJZkhnrGdLs3C
eJYFZWH1M8SrZyArdgmTRa+S2tvdkrUZ4FPvGMBCOXWR/r7SKScqXEq9WN52px8V
f3OUBtQxMXWw+ItCLnWjC9sMUjVxspBnkg+e/bCpkEuQ2pfIq/z2aXPUh/cTITyU
YqEbg/sMxQjiS4/9eYJ4Ok6w5I4txrF8IPFLvi2xfDRMpzxZyL/lj1Gjtx9L3Gn4
h/wHGHmBPHxZ+SfvSyJXjg3RkHZrf/MhvNZlfERnC8PIoYPgsTI=
=emYM
-----END PGP SIGNATURE-----

D
D
Denis 'GNUtoo' Carikli wrote on 29 Jan 02:41 +0100
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)(address . 74864@debbugs.gnu.org)
20250129024101.3ceb9be5@primary_laptop
Hi,

On Thu, 23 Jan 2025 19:33:46 +0000
Sharlatan Hellseher <sharlatanus@gmail.com> wrote:
Toggle quote (7 lines)
> > This also complicates things: contributions to adl-submit.py need to
> > fit into this file because that file is also served by the web
> > application.
>
> What if someone would like to create a proper python package first by
> taking that file and preparing pyproject.toml with all dependencies?
> It would ease the live both for packaging and maintain, WDYT?
Thanks a lot for the suggestion, I've started doing that and I sent a
first version of 2 patch sets that goes together for that which are
here:

The discussion happens in the first merge request (71).

Toggle quote (5 lines)
> I may prepare the project based on that script, I guess the license
> would let us do that, or propose maintainers of
> <https://framagit.org/agenda-libre/agenda-libre-ruby> to ship it as
> dedicated project with the same reason you described - it would help
> make live more bright and shiny.
I'm unsure this is a good idea or not as moving the adl-submit.py in a
separate repository might result in more maintenance for the Agenda du
libre maintainer.

However as I understand all major general purpose package managers
(Guix, Arch Linux's pacman, Gentoo's portage, Yocto's bitbake etc)
support changing directory during the build.

If we do that, would that create some undesirable side effect? For
instance would pip be able to build that? Would guix import work? What
about guix refresh or guix lint?

Since programming language package managers (like pip) tend to be more
strict than general purpose ones (like Guix), could that cause any
issues?

Denis.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEeC+d2+Nrp/PU3kkGX138wUF34mMFAmeZhy4ACgkQX138wUF3
4mM+EA//fTNfT0y1Wu55aSKUuKXNMXrSkkoD6hSfq0LbnWJOr1gKdTNIRKx9Gcq7
rF9XFaUIdO0UsnMkuAM3G7K8JLjh4HNMII8cQTB64XCAzY1R6Tgs+jWjDl6tYCJq
wWBEP4ZwvczuYwt3YMrfjKDJVAPW+7i9nlZg+qrdkdq2vTIDA46H7fpRF4TmLGc6
KsKciDONmBau5cQrKRj9iO3X+CO8MK5jelIbxsUkbTgVkFhHDGnsw6sGvNDhsZnn
DJHhpcJQOD5DIanxYnKEZ78opn5NRVkCIlKSCQSzVRtD1VbfZydZ98TzIlRvgxwl
+/1IHgyOWfggHu0UrGRkYCSkEuK3XsmADGi6nDccLPRyUdYg71N3JIrw5NrNG6qB
azKzpkBad9qHSiSqpKEkSMmWW9M4LwJVZr0Gg6lWOqWTQp8qbs9FO9ihMcxtik41
wJcNq1IuLzHmgjxZSVSPWrFsyy9gK5WUQ0xpjUL0qTFVp6zDcLHZSDFz/HT8mwdy
ZIuhoJ51MaQRrnUjpq0Ndk4FRwKAwE7dqwc4J+me13zZpwywn1BgwaQnhebCUdUr
2uH1Wt4PPbFYflvOChuSuhckuo7hs5VgpdIXfwP/4LrprXP7dszKNq1GA7hg9Cnu
AV7SYcb2cSPeu8MXI5dwu9XJRJ/2YoEPxz7JW9SiYtP4PTuTIw4=
=pI0W
-----END PGP SIGNATURE-----


?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 74864@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 74864
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch