displaycal-py3
displaycal-py3 copied to clipboard
``setup.py`` doesn't install data files and folders
Running python3 setup.py install
skips the following files and folders to be included in the installation:
lang
presets
ref
theme
ti1
xrc
Apparently it is copying the files under the share/DisplayCAL
folder. So now the problem converts into that, DisplayCAL can't find them.
The setup.py
definitely needs a modern OOP approach where proper objects per OS are used instead of very very very cumbersome and complex if
statements. This issue can definitely benefit from this kind of approach. But for now python setup.py install --install-data $HOME/.local
is a working workaround.
This is fixed in 578ad89
It seems that this is not properly fixed, the data files are getting installed in to the venv/lib/python3.x/site-packages/DisplayCAL-*.egg/share/DisplayCAL
folder where as they should be installed to .local/share/DisplayCAL
and referenced from there.
@eoyilmaz thanks for this work you're been doing on displaycal first of all.
I just wanted to add that in my case I installed displaycal with pipx install displaycal
and then all the resources are copied to ~/.local/pipx/venvs/displaycal/share/DisplayCAL/
which is not seen from the application for some reason.
I simply copied all the content of the folder above to ~/.local/share/DisplayCAL
as you wrote above. I'm sure this will be fixed soon but if others find the same error they now have a temporary solution.
As reference, these are the error messages output to console that I used to have before copying those files:
(base) aadm@psion:~ $ displaycal
XDG: [Errno 2] No translation file found for domain: 'xdg-user-dirs'
Acquired lock file: <DisplayCAL.main.AppLock object at 0x7f9d775c85b0>
displaycal 3.9.6 2022-06-11T22:07:30Z
ubuntu 21.04 hirsute x86_64
Python 3.9.5 (default, Nov 18 2021, 16:00:48)
[GCC 10.3.0]
Faulthandler
wxPython 4.1.1 gtk3 (phoenix) wxWidgets 3.1.5
Encoding: utf-8
File system encoding: utf-8
Loading /home/aadm/.config/DisplayCAL/DisplayCAL.ini
listening
writing to lock file: port: 15411
NoneType: None
┌──────────────────────────────────────────────────────────────────────────────┐
│ NoneType: None │
└──────────────────────────────────────────────────────────────────────────────┘
Traceback (most recent call last):
File "/home/aadm/.local/pipx/venvs/displaycal/lib/python3.9/site-packages/DisplayCAL/main.py", line 549, in main
_main(module, name, applockfilename)
File "/home/aadm/.local/pipx/venvs/displaycal/lib/python3.9/site-packages/DisplayCAL/main.py", line 485, in _main
raise ResourceError(
DisplayCAL.debughelpers.ResourceError: resources.notfound.error
lang/en.yaml
┌──────────────────────────────────────────────────────────────────────────────┐
│ Traceback (most recent call last): │
│ File │
│ "/home/aadm/.local/pipx/venvs/displaycal/lib/python3.9/site-packages/DisplayCAL/main.py", │
│ line 549, in main │
│ _main(module, name, applockfilename) │
│ File │
│ "/home/aadm/.local/pipx/venvs/displaycal/lib/python3.9/site-packages/DisplayCAL/main.py", │
│ line 485, in _main │
│ raise ResourceError( │
│ DisplayCAL.debughelpers.ResourceError: resources.notfound.error │
│ lang/en.yaml │
└──────────────────────────────────────────────────────────────────────────────┘
Exiting displaycal
Ran application exit handlers