|
From: | Alexis Simon |
Subject: | Re: Python package with some rust dependency |
Date: | Thu, 15 Feb 2024 22:08:08 -0800 |
User-agent: | Mozilla Thunderbird |
Hi,So right now I'm trying to go the splitting in two packages way, similar to what is done for python-cryptography.
So I managed to build the first one that produces a header file in the store /gnu/store/*/lib/header.h
In the second package, I don't get how to copy this file inside the build. I've been trying something like this:
``` (native-inputs (list python-fwdpy11-rust-lib)) (arguments (list #:phases #~(modify-phases %standard-phases (add-before 'build 'copy-rust-lib (lambda* (#:key native-inputs #:allow-other-keys) (copy-file (search-input-file native-inputs "lib/fp11rust_api.h") "lib/core/internal/fp11rust_api.h")))))) ```Which complains there is no match, because it seams the package store path is not present in the native-inputs, although I specify it in the package.
Thanks, Alexis On 13/02/2024 13:55, Alexis Simon wrote:
Fair enough, I just meant that it's pretty hard as a newcomer to know which build system You're supposed to use to start with when encountering a project where several languages are used.Alexis On 13/02/2024 13:46, Carlo Zancanaro wrote:On Tue, Feb 13 2024, Alexis Simon wrote:Ok, this seems really counter intuitive though to go and use the cargo build system for a python package only have a tiny part in rust.I'm not sure why this is counter-intuitive. The existence of any rust at all means you need to build rust code. The normal way to do that in Guix is to use the cargo-build-system. Equally, I don't find it strange that the upstream build instructions[1] ask me to install a rust compiler and cbindgen. I need to do that if I want to build rust code. It's also worth noting that there are 22 packages in Cargo.lock[2], so building the one rust file in the repository is a bit more involved. Carlo [1]: https://molpopgen.github.io/fwdpy11/misc/developersguide.html[2]: https://github.com/molpopgen/fwdpy11/blob/main/rust/fp11rust/Cargo.lock
[Prev in Thread] | Current Thread | [Next in Thread] |