all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* What build system would be more appropriate for this application
@ 2022-09-06 22:54 Luis Felipe
  2022-09-15 20:09 ` Luis Felipe
  0 siblings, 1 reply; 2+ messages in thread
From: Luis Felipe @ 2022-09-06 22:54 UTC (permalink / raw)
  To: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 1212 bytes --]

Hi,

I'm packaging a Python application that doesn't have anything requiring compilation, it just needs copying files to the appropriate directories, so I started with the copy-build-system using an install-plan as follows:

~~~
(build-system copy-build-system)
(arguments
 `(#:install-plan
   `(("help/C/mazo" "share/help/C/")
     ("icons/mazo.svg" "share/icons/hicolor/scalable/apps/")
     ("mazo" "lib/python3.9/site-packages/")  ; FIXME: Use GUIX_PYTHONPATH
     ("lugare.ulkeva.Mazo.desktop" "share/applications/")
     ("mazo.py" "bin/mazo"))))     ; TODO: Make executable
;; TODO: Run tests.
~~~

This way, the package builds and I'm able to run the application in a guix shell. However, as the comments above indicate, I'd like to

1. Indicate the destination for the "mazo" Python package using GUIX_PYTHONPATH instead of the hardcoded path.
2. Make sure the "bin/mazo" file is executable (the source, "mazo.py", is executable, though).
3. Run tests

Do you think I can achieve these sticking to the copy-build-system, or would it be necessary to resort to meson or similar build systems?

Thanks in advance,


---
Luis Felipe López Acevedo
https://luis-felipe.gitlab.io/

[-- Attachment #1.2: publickey - luis.felipe.la@protonmail.com - 0x12DE1598.asc --]
[-- Type: application/pgp-keys, Size: 1722 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 509 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: What build system would be more appropriate for this application
  2022-09-06 22:54 What build system would be more appropriate for this application Luis Felipe
@ 2022-09-15 20:09 ` Luis Felipe
  0 siblings, 0 replies; 2+ messages in thread
From: Luis Felipe @ 2022-09-15 20:09 UTC (permalink / raw)
  To: Luis Felipe; +Cc: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 1532 bytes --]

Hello Luis Felipe,

On Tuesday, September 6th, 2022 at 22:54, Luis Felipe <luis.felipe.la@protonmail.com> wrote:

> This way, the package builds and I'm able to run the application in a guix shell. However, as the comments above indicate, I'd like to
> 

> 1. Indicate the destination for the "mazo" Python package using GUIX_PYTHONPATH instead of the hardcoded path.
> 2. Make sure the "bin/mazo" file is executable (the source, "mazo.py", is executable, though).
> 3. Run tests
> 

> Do you think I can achieve these sticking to the copy-build-system, or would it be necessary to resort to meson or similar build systems?

I found that using the python-build-system was more appropriate after all, even though the application doesn't use setuputils or anything like that.

To address problem (1), I found that once you use the python-build-system, a "site-packages" procedure becomes available. It returns the appropriate path were to place Python packages. The "site-packages" procedure is not documented in the manual, though. The procedure is defined in the module "(guix build python-build-system)". Grepping for "site-packages" in Guix package definitions shows lots of examples.

To address problem (2), there's Guile's "chmod" procedure. For example: (chmod "myscript" #o555). Plenty of examples in Guix packages too.

As for (3), I could replace the check phase normally, in the same way it is done in many package definitions.

So now I have a package definition I will be sending soon for review :)

[-- Attachment #1.2: publickey - luis.felipe.la@protonmail.com - 0x12DE1598.asc --]
[-- Type: application/pgp-keys, Size: 1722 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 509 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-15 20:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-06 22:54 What build system would be more appropriate for this application Luis Felipe
2022-09-15 20:09 ` Luis Felipe

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.