all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Using an alternative python to build python modules
@ 2023-02-17 21:27 Kyle Andrews
  2023-02-18  9:57 ` Wojtek Kosior via
  2023-02-21 12:52 ` Simon Tournier
  0 siblings, 2 replies; 13+ messages in thread
From: Kyle Andrews @ 2023-02-17 21:27 UTC (permalink / raw)
  To: help-guix


Dear Guix,

I want to use the python-apted package in my manifest. That package is
not in Guix, but can readily be fetched from:

```
guix import pypi APTED > python-apted.scm
```

I just had to prefix the following modules to turn that into a package
definition as well as a manifest.

```
(use-modules (guix packages)
	     (guix download)
	     (guix licenses)
	     (guix profiles)
	     (gnu packages)
	     (guix build-system python))
```

During my original testing of my scientific workflow I discovered that
there was a bug introduced to the APTED package which was caused by a
change in how python worked under the hood. As a result, the APTED
package only advertises compatibility with python versions less than
3.7. So, I would like to use python 3.6 to be on the safe side.

I also want to include 60+ other packages in my manifest which are
"current" with the Guix repository and included within it. For
situations like this it would be really convenient if it were possible
to pass a version of python to python-build-system. Then, I hope all I
would have to do is pass another another defined variant of the python
package (e.g. called python-3.6) into that build-system argument.

For example:

```
(build-system python-build-system #:python python-3.6)
```

That would be quite convenient and in line with the level of complexity
I was faced with when I took the conda approach before trying to use
Guix. Unfortunately, this functionality doesn't seem to be provided out
of box and I am seeking help in the hopes that there is an easy way to
do it.

Am I thinking about this right?

Thanks,
Kyle

P.S.

APTED claims to also be able to run on top of python-2.7 so maybe that
fact could be used to simplify this specific issue. I just wanted to
discuss the general problem first because I really want Guix to gain
broad traction within the scientific community.

P.P.S.

Here is a pretend manifest where I would love guidance on how to make
python-apted get built in the context of python-2.7 or ideally
python-3.6 even though the latest version of python is python-3.9 (where
APTED doesn't always work).

```
(use-modules (guix packages)
	     (guix download)
	     (guix licenses)
	     (guix profiles)
	     (gnu packages)
	     (guix build-system python))

(define-public python-apted
  (package
    (name "python-apted")
    (version "1.0.3")
    (source (origin
              (method url-fetch)
              (uri (pypi-uri "apted" version))
              (sha256
               (base32
		"1sawf6s5c64fgnliwy5w5yxliq2fc215m6alisl7yiflwa0m3ymy"))))
    (build-system python-build-system)
    (arguments '(#:tests? #f))
    (home-page "https://github.com/JoaoFelipe/apted")
    (synopsis "APTED algorithm for the Tree Edit Distance")
    (description "APTED algorithm for the Tree Edit Distance")
    (license expat)))

(concatenate-manifests
 (list (specifications->manifest (list "r" "r-dplyr" "r-reticulate"))
       (packages->manifest (list python-apted))))
```


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

end of thread, other threads:[~2023-02-24  1:17 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-17 21:27 Using an alternative python to build python modules Kyle Andrews
2023-02-18  9:57 ` Wojtek Kosior via
2023-02-18 17:53   ` Edouard Klein
2023-02-20 22:29     ` Kyle Andrews
2023-02-21 16:50       ` Edouard Klein
2023-02-21 12:52 ` Simon Tournier
2023-02-21 20:26   ` Kyle Andrews
2023-02-21 21:10     ` Simon Tournier
2023-02-22  9:23       ` Simon Tournier
2023-02-21 21:28     ` Kyle Andrews
2023-02-22  4:23       ` Kyle Andrews
2023-02-22 10:09         ` Simon Tournier
2023-02-24  0:16           ` Kyle Andrews

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.