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

Unable to import blivet with "minimal dependencies" #894

Closed
RaitoBezarius opened this issue Sep 1, 2020 · 4 comments
Closed

Unable to import blivet with "minimal dependencies" #894

RaitoBezarius opened this issue Sep 1, 2020 · 4 comments

Comments

@RaitoBezarius
Copy link

I am trying to package the latest version of blivet for NixOS in order to use it with https://github.com/NixOS/nixpart ; but I'm running in a lot of issues and I'm not really accustomed to the whole project.

As far as I understand it, this project requires:

  • libblockdev
  • pykickstart
  • pyparted
  • pyudev
  • libselinux
  • pygobject3
  • six

What I don't understand is especially, how versions are locked for these dependencies.
But, even if I try to bump everything to their latest version, I'm running in the following issue:

ValueError: Namespace BlockDev not available related to GObject, so I can only guess it is due to libblockdev, but unsure why.
I can only infer that GObject has some automatic discovery somewhere, it would be interesting to know how/why.

Do you have any idea regarding all those points?

Thanks in advance :)

@vojtechtrefny
Copy link
Member

vojtechtrefny commented Sep 1, 2020

* pykickstart

Pykickstart is no longer needed, we've removed this dependency in 3.0 (together with moving installer-specific code to Anaconda).

You are also missing libbytesize and its python bindings.

ValueError: Namespace BlockDev not available related to GObject, so I can only guess it is due to libblockdev, but unsure why.
I can only infer that GObject has some automatic discovery somewhere, it would be interesting to know how/why.

libblockdev is a C library and we use GObject Introspection to build Python bindings for it. The ValueError you see mean GI can't find the typelib file for libblockdev (BlockDev-2.0.typelib). On Fedora it is located in /usr/lib64/girepository-1.0/BlockDev-2.0.typelib and we ship it in the libblockdev package but on some distributions (like Debian) typelib files are shipped in separate packages (gir1.2-blockdev-2.0 for Debian). I'm not sure how packaging on NixOS works, I hope this helps.

Also make sure you have the BlockDev.py file with GI overrides (in Fedora this in the standard Python site-packages folder, e.g. /usr/lib64/python3.8/site-packages/gi/overrides/BlockDev.py and in a separate python3-blockdev package).

@vojtechtrefny
Copy link
Member

@RaitoBezarius were you able to get this working? Is there something else we can help you with or can we close this issue?

@vojtechtrefny
Copy link
Member

I assume you were able to fix the issue and I'm closing this now, feel free to reopen the issue or report a new one if you need additional help.

@RaitoBezarius
Copy link
Author

RaitoBezarius commented Jan 6, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants