-
-
Notifications
You must be signed in to change notification settings - Fork 354
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
Regression: Cantera install into /usr/local/*, not /usr/* on Fedora Linux #1233
Comments
Thanks @mefuller! So the install message shows the right place but the files don't end up in that place? Can you figure out what flags pip requires to put things in that folder? |
@bryanwweber your understanding is correct - the terminal output shows the desired directories, but the actual location is wrong. |
That's very strange because pip is used to find the installation location that's printed... The line in the log you linked looks correct too. Maybe I'm misunderstanding the Setuptools/pip options. |
I can't seem to replicate this on Fedora 35. I ran: scons build python_package=y prefix=/usr python_prefix=/usr stage_dir=STAGE and ended up with the Python module installed in Similarly, if I do a non-staged install, the Python package is installed to |
@speth were you using the latest |
The problem with My command is I haven't changed any options in my build specs, so I'll check Ray's command for F35, but something definitely changed: Logs: |
@mefuller Same question to you, are you using the tagged 2.6.0b1 commit or the latest commit on |
I had grabbed the latest commit - I'll retest tonight or tomorrow |
|
Yes, of course. I was using a fresh clone of the repo into a Docker container, of I tried again using @mefuller's exact build command, but am still seeing all the files end up in the right place. The logs from |
One thing I did notice that seems incorrect here (at least, if I understand the Fedora filesystem correctly) is that the Python module is being installed (mostly) to |
Recording this here before I forget. I got (what I think is) the rpmbuild process running with Docker via:
The important thing in the Docker line is the The files after the build are located in |
Yes, this is an issue across versions (F35, F36, Rawhide). We see the directory mismatch in all three versions' buildlogs (and I just rebuilt x86_64 with the python_prefix specified and also with the latest commit, b4616ef):
To be extremely clear about the issue, the scripts are correctly installed on F35, as @speth observed: his builds in a F35 Docker container show the same results as mine (https://download.copr.fedorainfracloud.org/results/fuller/cantera-test/fedora-35-x86_64/03954713-cantera/builder-live.log.gz). The regression to installing the scripts in |
This is definitely Edit to add: |
I was able to replicate the described behavior on F37. The build commands:
eventually result in this reasonable-looking call:
But then both the scripts and the Python module itself end up installed in |
If I manually run
from the built source directory, things are installed to the right place on F35. @speth I wonder if Fedora are patching pip. Can you use |
On F37, using |
Can you try installing the wheel that gets built by |
Running the
Furthermore, this behavior is not particular to our package. The same thing happens installing packages like |
😱 This seems to be pretty clearly a bug in pip then... At least it's going in |
Since this is a bug in
I have a preference for Option 1 because it's less work right now, and releasing 2.6 has already been significantly delayed by packaging issues... |
The details of this are way out of my league, but philosophically I agree with |
I likewise agree that option 1 is preferable. |
I'd like to suggest a third option, which is to leave this as is, but add a couple lines to the Fedora packaging script to move the files to the correct location after they've been "installed" to the incorrect staging directory by pip. |
That would also work, provided that Fedora allows that in their official packages. @mefuller can you weigh in here? |
It should be possible. |
Just as an update, I can move the scripts to /usr/bin/ from /usr/local/bin/, but the Python installation is throwing "permission denied" errors when I try to move it |
ok, 2.6.0b2 is running and will be pushed to the repos - I made the required hacks Not closing the issue since the install location is still wrong, but I leave it up to "upstream" to decide how to proceed |
Thanks @mefuller! Per pypa/pip#10978, can you check with Fedora upstream about how they've patched |
I dug a bit further into this, and it seems like this is a result of RedHat/Fedora patching the builtin >>> sysconfig.get_paths('posix_prefix', {'platbase': 'test'})['platlib']
'test/local/lib64/python3.10/site-packages' which is a variant of what >>> sysconfig.get_paths('rpm_prefix', {'platbase': 'test'})['platlib']
'test/lib64/python3.10/site-packages' However, I don't know how to specify the use of this scheme to |
@speth I don't see |
Yes, of course. |
I will try to run down this today. The punchline on the builds from v2.6.0b2 is that the rewrite to use wheels introduced some other errors in installation location in current versions, but it appears that two out of four total kludges will age out in a year, so I wouldn't increase the scope of the problem beyond what was originally described for Fedora Rawhide. For those of you who are scoring at home, by the time I finished hacking in a solution, we got this:
|
ok, so looking at the pip and distutils spec files ( Those macros are defined in https://src.fedoraproject.org/rpms/python-rpm-macros/blob/rawhide/f/macros.python3 Not being so familiar with the details, I'll just leave that here for now, but perhaps it can offer some useful information |
I think the end result here is that there's nothing we can/should change in our build process. |
Problem description
Building current Cantera 2.6.0b1 (commit 6102cd5) with scons build and install prefix set to /usr/, packages are actually installed as follows:
/usr/local/bin/ck2cti (...)
/usr/local/lib64/python3.10/site-packages/Cantera-2.6.0b1.dist-info/INSTALLER (...)
/usr/local/lib64/python3.10/site-packages/cantera/init.pxd (...)
Output from install indicates that they should be installed where I do want them, i.e.,
Steps to reproduce
Exact reproduction of #1149
Behavior
Additional issue from #1149 is that Python files are now installed under /usr/local/lib64..., not /usr/lib64...
System information
Additional context
See build log: https://download.copr.fedorainfracloud.org/results/fuller/cantera-test/fedora-rawhide-x86_64/03938964-cantera/builder-live.log.gz
#1149
The text was updated successfully, but these errors were encountered: