Open rupurt opened 3 weeks ago
I managed to get past the lock step by setting the module nativeBuildInputs
nativeBuildInputs = [
config.deps.cargo
config.deps.rustc
];
However now I'm getting an error that the maturin backend is not available
error: builder for '/nix/store/5iyp7bl10msjnyhma16yzhr4v3jc89xi-python3.12-object-store-python-0.1.10.drv' failed with exit code 1;
last 25 log lines:
> Running phase: patchPhase
> Running phase: updateAutotoolsGnuConfigScriptsPhase
> Running phase: configurePhase
> no configure script, doing nothing
> Running phase: buildPhase
> Executing pypaBuildPhase
> Creating a wheel...
> * Getting build dependencies for wheel...
>
> Traceback (most recent call last):
> File "/nix/store/94h0xf60fkvmz4gvwbp9xbaf5wiqy8hf-python3.12-pyproject-hooks-1.0.0/lib/python3.12/site-packages/pyproject_hooks/_impl.py", line 321, in _call_hook
> raise BackendUnavailable(data.get('traceback', ''))
> pyproject_hooks._impl.BackendUnavailable: Traceback (most recent call last):
> File "/nix/store/94h0xf60fkvmz4gvwbp9xbaf5wiqy8hf-python3.12-pyproject-hooks-1.0.0/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 77, in _build_backend
> obj = import_module(mod_path)
> ^^^^^^^^^^^^^^^^^^^^^^^
> File "/nix/store/c7ycrgwv039nqglbif98yggx211sdbcl-python3-3.12.3/lib/python3.12/importlib/__init__.py", line 90, in import_module
> return _bootstrap._gcd_import(name[level:], package, level)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
> File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
> File "<frozen importlib._bootstrap>", line 1324, in _find_and_load_unlocked
> ModuleNotFoundError: No module named 'maturin'
>
> ERROR Backend 'maturin' is not available.
For full logs, run 'nix log /nix/store/5iyp7bl10msjnyhma16yzhr4v3jc89xi-python3.12-object-store-python-0.1.10.drv'.
Made some more progress by using the maturinBuildHook
from rustPlatform
in the pip override
object-store-python = {
mkDerivation = {
sourceRoot = "object-store-python-6144879f3061f298122b28318bcad0a7d4001d09/object-store";
};
buildPythonPackage = {
build-system = [
config.deps.rustPlatform.maturinBuildHook
];
};
};
It's now failing because the Cargo.lock
file is in the source root directory but the pip package I want to build in the object-store
subdirectory. I think I'll need to remove the sourceRoot
and figure out how to pick the correct subdirectory with pyproject.toml
to build.
Howdy :wave:
I'm trying to add object-store-python as a dependency that will build from source as they haven't released a new pypi version. Is this possible with the current pip module? I've tried adding an override with cargo but it doesn't seem to get picked up.