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
Issues with both building/install methods #117
Comments
Can you try the latest of the |
Any specific commit in mind that I should backport? As stated in #103 I cannot build from direct source apparently, so I will have to add them on top of latest release: the less they are, the better. |
Are these instructions not working for you https://github.com/eoyilmaz/displaycal-py3/tree/develop#how-to-install |
If not, I can provide a source |
No, #103 is what I get when I run But yeah, a tar.gz would be nice indeed. |
Here you are: DisplayCAL-3.9.5.tar.gz |
OK, no change regarding this issue, files are still installed in the wrong place:
|
I think you shouldn't specify the Also, what is the output of the following command: echo $XDG_DATA_DIRS |
The
|
Okay so I over looked the #103 and provided a tarball and closed it. But let me try to understand what is going on here. The GitHub provided tarball was not working for your, that's normal, the tarball that I was providing should be working fine. And I still don't understand why you need the My instructions should allow you to install |
I’m not trying to “install” DisplayCAL, I’m packaging it for Arch Linux. This requires to use system python (no venv), system libs (so no Until 3.9.3 included a |
Aaah now I understand. I don't think we are ready for packaging it up yet. There are some issues around the Open Source license. We have not granted Florian's consent. We might need to change the project's name #96. |
Well the pressure to remove python2 is bigger than the interrogations around the licensing on our side (we could just carry the changes as a patch atop latest Florian’s release, that would be the same for us and there would likely be no legal issue with that). So I’ve been packaging your fork since your first announced release. |
Okay, fair enough. So, I think it is time to start working for packaging related issues then... Let's solve this one... |
As I see the desktop file location is coming from this line: displaycal-py3/DisplayCAL/worker.py Line 10468 in eb917f5
and then the displaycal-py3/DisplayCAL/defaultpaths.py Line 409 in eb917f5
and displaycal-py3/DisplayCAL/defaultpaths.py Line 193 in eb917f5
it needs the I'm curios how it was working with the
Update: So, I see that we need the By the way, as I see the Tbh, I have no idea right now, I need a little guidance from your side. |
Installing is not involved at any point here, for what is implied here installing is just extracting the package tar on the system. So if things are correct at build time, they will be correct at install time (installation is done by the Arch package manager, pacman). The paths I’ve listed above are relatives to the A setuptools build put the udev and autostart files at the standard places, a build/wheel one does not. Using setuptools the desktop file is at the autostart path right away, even if they are no profile yet. It might not be necessary indeed, and installation together with a profile would make sense, but I don’t know whether that works. I don’t know how setuptools get the correct path, python packaging is something I’m only a user of. I’ll ask our python packaging expert. |
The reason it used to work is because This is done by the displaycal-py3/DisplayCAL/setup.py Line 980 in 3b25f05
Which is deprecated. https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-data-files I recommend reading this, which explains how to properly migrate to wheels. https://setuptools.pypa.io/en/latest/userguide/datafiles.html If you want some reasoning why this happened, you can check this out. |
Okay thank you for the links, I'll read them. |
So, I've somewhat looked in to the suggested documentations. As I see, one of the solutions to remove the displaycal-py3/DisplayCAL/setup.py Line 1527 in 3b25f05
But, I see that the displaycal-py3/DisplayCAL/setup.py Line 1023 in 3b25f05
So, I've updated those lines ( 41a6b11 ) to also work with Linux, let's see if it is going to fix your problem. |
Ah you need a tarbal, right? DisplayCAL-3.9.5.tar.gz |
This seems worse and installed even more files into the Python location. But actually what @FFY00 tried to say is that you cannot handle it anymore under the modern way, that’s it. So these files should be handled manually by packagers on Linux (dunno how that works with pip though, I’ve asked…), just like I already do: for now I’m moving them from the location they get embedded at with the wheel, but if they are not anymore I’d just cp them from the source. To quote them from our IRC channel:
|
I'm following @FFY00 's suggestion, he says that In this page: https://setuptools.pypa.io/en/latest/userguide/datafiles.html it recommends using the Now, it might not be solving your issues at all. So, let me reproduce your problem and see if I can find a solution here on my development computer. As far as understand you are running the following command: python -m build --wheel --no-isolation
python -m installer --destdir="${pkgdir}" dist/*.whl What is the value of the |
OK, I admit again python packaging is far beyond my knowledge, and @FFY00 seems away tonight, so… Yes, those are the correct step, and technically |
That is the correct behavior. Files cannot be installed to an arbitrary location when using wheels, so you'll have to include it in the package source and have the users copy them to the right location if they want, or do it automatically at runtime. Downstream packagers should copy the files to the right location in their packages.
Yeah, it's just a staging directory. You can do |
I checked the The other data files will be moved to a suitable folder inside the package and as @FFY00 suggested, installing them at runtime is a very good option, but this will take time. The Update: |
I updated the And if I understand @FFY00 correctly, for your packaging, the placement of the other data files are your responsibility, so good luck with them... As I said, I'll try to move the data files in to the package and hopefully other than some desktop shortcuts everything will be installed by DisplayCAL in to the correct placement, in the future releases. If you can confirm that it is okay for you. I'll release the 3.9.5. |
Hmmm... as I see we have a |
Yep. We can just place them on the right location during the package building.
Great!
I wonder is DisplayCAL would benefit to moving to a more modern build backend like https://github.com/pypa/hatch or https://github.com/FFY00/meson-python. |
I was looking in to Poetry: https://python-poetry.org/docs/ |
Don't you need to compile native code? |
I didn't understand you question. Do you imply, if we use Poetry we'll not be able to compile the C-Extension? |
Yes, sorry, I forgot they changed that recently. |
@ArchangeGabriel are you okay with the latest development branch. I'm planning to release 3.9.5 today or may be tomorrow. |
Well as I said the build system now install even more files at the wrong place. I prefer the status quo from before (where we had to manually handle 2/3 files) over the changes from 41a6b11, so I’d say let’s revert this commit, but maybe I’m missing something and it was actually required for other cases? |
As far as I see, the only difference is these 4 new files are included in the new tarbal:
And these are meant to be included. So there is no difference at all. So, I don't think that we need to revert anything and I'm going to release 3.9.5 today or tomorrow. Thank you. |
Those are the difference we see on Arch: displaycal_package_content_diff.txt The three ref files seems OK and actually missing from before. Some names are truncated because of the way this is displayed to me, but here is the full package content: As you can see there is a lot of redundancy in the added files. |
Yeah yeah, I just realized that I was wrong, and I was just comparing the tarball content. |
I reverted the change that makes the Please confirm that if it is working for you. Then we can release 3.9.5 and keep working on the build system. |
Same issue. I think the whole of 41a6b11 should be reverted. Actually I should be able to test that by patching locally I guess. EDIT: Confirmed, reverting the whole commit does fix it. |
So, one more question, in the previous method, using |
Yes.
Exactly, that’s what @FFY00 said I should do normally (in 3.9.4 I moved them from the wheel to their correct place, but once they are not in the wheel anymore I’ll just install them from the tarball to the right place). |
Okay let's fix your problem, then we should definitely have a more modern build system. I'm reverting back 41a6b11 completely. And I'll do a new |
Okay |
Sorry for the delay answering here, I had to get this on hold until we could get wxpython 4.1.x into Arch. Building 3.9.6 resulted in the Argyll rule to disappear (which is fine as we discussed), but the autostart file is still installed, at a wrong place (while we said it should not be automatically installed IIRC). So there is some progress here, but not ideal either. That being said, I’m fine working around this at packaging time if that is too much work for you to solve. :) |
Hello, displaycal-py3/DisplayCAL/setup.py Lines 712 to 715 in 04c0c49
The problem is that prefix is void. I don't know why, probably because of how the setup.py is called. In our package build, the user is not root, thus userid is not 0. And as the prefix is no set, it doesn't start with "/". |
But this has no effect on the destination :/ |
if the conditions are matching what you given then |
Until now I used the traditional
setuptools
building way:But with 3.9.4 it fails in the second step with:
So I’ve tried to switch to the new way using
build/installer
:But then some files are misplaced:
instead of
Also, note that these udev rules are already provided by ArgyllCMS, so they should not be installed by DisplayCAL I think.
The text was updated successfully, but these errors were encountered: