Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure: python312packages.bsddb3 #308232

Closed
D3vil0p3r opened this issue May 1, 2024 · 7 comments · Fixed by #310421
Closed

Build failure: python312packages.bsddb3 #308232

D3vil0p3r opened this issue May 1, 2024 · 7 comments · Fixed by #310421
Labels
0.kind: build failure A package fails to build

Comments

@D3vil0p3r
Copy link
Member

D3vil0p3r commented May 1, 2024

Steps To Reproduce

Steps to reproduce the behavior:

  1. build bsddb3 Python312packages

Build log

Executing pythonRemoveTestsDir
Finished executing pythonRemoveTestsDir
Running phase: installCheckPhase
Traceback (most recent call last):
  File "/build/bsddb3-6.2.9/test.py", line 42, in <module>
    import test3 as test
  File "/build/bsddb3-6.2.9/test3.py", line 138, in <module>
    from distutils.util import get_platform
ModuleNotFoundError: No module named 'distutils'
error: builder for '/nix/store/lwi0kygzgr0azj1hahcl57hzry3i5cw2-python3.12-bsddb3-6.2.9.drv' failed with exit code 1;
       last 10 log lines:
       > patching script interpreter paths in /nix/store/fidk6hgvsza9gl562y3vcpv2zrvcxhfs-python3.12-bsddb3-6.2.9-dist
       > Executing pythonRemoveTestsDir
       > Finished executing pythonRemoveTestsDir
       > Running phase: installCheckPhase
       > Traceback (most recent call last):
       >   File "/build/bsddb3-6.2.9/test.py", line 42, in <module>
       >     import test3 as test
       >   File "/build/bsddb3-6.2.9/test3.py", line 138, in <module>
       >     from distutils.util import get_platform
       > ModuleNotFoundError: No module named 'distutils'
       For full logs, run 'nix log /nix/store/lwi0kygzgr0azj1hahcl57hzry3i5cw2-python3.12-bsddb3-6.2.9.drv'.

Additional context

Python 3.12 seems to have removed distutils package but it should be inside setuptools module according #253751

Sadly this package is a dependency of several Python packages.

Notify maintainers

@jonringer @tjni @mweinelt

PS: the package has not maintainers.

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.28, NixOS, 24.05 (Uakari), 24.05pre615148.6143fc5eeb9c`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - channels(root): `"home-manager, nixos, nixpkgs"`
 - nixpkgs: `/home/athena/.nix-defexpr/channels/nixpkgs`

Add a 👍 reaction to issues you find important.

@D3vil0p3r D3vil0p3r added the 0.kind: build failure A package fails to build label May 1, 2024
@mweinelt
Copy link
Member

mweinelt commented May 1, 2024

If bsddb imports distutils, then it is not compatible with Python 3.12. This is something for upstream to solve, but is unlikely to happen:

This library is deprecated. If you are running Python 3 >= 3.6, please upgrade to berkeleydb library. Check details.

https://pypi.org/project/bsddb3/

@D3vil0p3r
Copy link
Member Author

So all those packages that depend on this package, like python312packages.scrapy must be labeled as broken?

@mweinelt
Copy link
Member

mweinelt commented May 3, 2024

Scrapy claims to support Python 3.12. Are you sure bsddb3 is still in their dependency chain?

@D3vil0p3r
Copy link
Member Author

Scrapy claims to support Python 3.12. Are you sure bsddb3 is still in their dependency chain?

Im not sure about that.

@D3vil0p3r
Copy link
Member Author

I see this merged PR #309729 that probably should solve the issue on scrapy... but about bsddb3, it must be removed from python 3.12 package group...

mweinelt added a commit to mweinelt/nixpkgs that referenced this issue May 9, 2024
They require distutils, which has been removed in 3.12.

Closes: NixOS#308232
@AkechiShiro
Copy link
Contributor

@mweinelt distutils is used in the test of bsddb3 to get the platform data, we patched this behavior in the following PR #308157

@AkechiShiro
Copy link
Contributor

Isn't It better to patch the test to avoid using distutils but still having it run ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: build failure A package fails to build
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants