-
Notifications
You must be signed in to change notification settings - Fork 42
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
The rpm places the module in the wrong directory on Fedora 35 #512
Comments
Hi. Thanks for reporting this. Unfortunately RPM distros don't have universal Python lib directory like Debian does I tried finding a better solution but I failed. I simply don't know where to put this directory or how detect it during installation since RPM builder takes current python version in build time and that's where it ends up. Solution to your problem is to build a package on your OS and then install it. I will be producing package myself, but I have to install Fedora 35 now as well. It's getting harder increasingly. Am certain there's a simple solution but I was unable to find it. If you have any information on this, please let me know. I've spent embarrassing amount of time trying to fix this issue which is plaguing me for years now. I will leave this issue open as a reminder for next version. Hopefully a universal solution comes up. |
How about building a Flatpak package #421 ? While I'm not a huge fan of installing additional runtimes for small applications, but most users would benefit from Flatpak, as it is easier to install and won't have issues on different distributions, as runtime is the same on every one. I think building Flatpak could be automated, so there will be less maintenance later, as updates could reach users very quickly after commit to main branch. |
I'll certainly look at solving that one. My love for flatpak died some time ago after I tried using it. Had nothing but issues with it and I didn't want to deal it on my personal projects as well. I have very limited free time to work on Sunflower as it is, dealing with Flatpak issues is last of things I want that time to be spent on. That said need seems to be getting there so I'll have to look into it. |
@MeanEYE is there a guide somewhere on how to build this project? Or can you tell me what I have to do? I have the same problem. |
Building RPM or DEB package is done through make file. So it's simply
|
@MeanEYE thanks a lot, that worked! :) |
This issue continues to be of relevance on Fedora 38: $ sunflower
Traceback (most recent call last):
File "/usr/local/bin/sunflower", line 4, in <module>
runpy.run_module('sunflower', run_name='__main__', alter_sys=True)
File "<frozen runpy>", line 222, in run_module
File "<frozen runpy>", line 142, in _get_module_details
ImportError: No module named sunflower
$ python --version
Python 3.11.4
$ rg '^(NAME|VERSION)=' /etc/os-release
1:NAME="Fedora Linux"
2:VERSION="38 (Workstation Edition)" How do other projects solve this question? Maybe there is a way to do a matrix build accross currently supported revisions? |
The core issue seems to be that:
Otherwise the install is not Pythonic, but rather is working around Python's predictable systems. The install method recommended by Python is: If there is some limitation of RPM that makes the package maintainer have to choose where to put files, they could be placed in /usr/lib/sunflower (resulting in the module being |
To be completely honest RPM is a mystery to me. Am a Debian user so building and testing packages is easily done but when it comes to RPM it seems that every distro that inherits the package manager decides to do something interesting. I would love to come up with a universal solution if there's one but I had no such luck. Same thing goes with Python's |
An updated Fedora 35 runs Python 3.10, but the Sunflower RPM installs the module specifically to
/usr/lib/python3.9/site-packages
.Actual behavior:
The following workaround is confirmed to work:
sudo ln -s /usr/lib/python3.9/site-packages/sunflower /usr/lib/python3.10/site-packages/
Expected behavior:
The rpm may have to have scripting or a separate package for different Python versions.
The text was updated successfully, but these errors were encountered: