eoyilmaz / displaycal-py3

DisplayCAL Modernization Project
https://eoyilmaz.github.io/displaycal-py3/
GNU General Public License v3.0
842 stars 59 forks source link

Error while installing DisplayCAL 3.9.9 #209

Closed ignace72 closed 1 year ago

ignace72 commented 1 year ago

Good evening to all. I fail to install with all the distributions I could test. I have the following terminal output:

~/ pip install displaycal --upgrade
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: displaycal in ./.local/lib/python3.10/site-packages (3.9.8)
Collecting displaycal
  Downloading DisplayCAL-3.9.9.tar.gz (10.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.6/10.6 MB 4.6 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: Pillow in /usr/lib/python3.10/site-packages (from displaycal) (9.3.0)
Requirement already satisfied: distro in /usr/lib/python3.10/site-packages (from displaycal) (1.8.0)
Requirement already satisfied: wxPython in /usr/lib/python3.10/site-packages (from displaycal) (4.1.1)
Requirement already satisfied: dbus-python in ./.local/lib/python3.10/site-packages (from displaycal) (1.2.18)
Requirement already satisfied: Send2Trash in /usr/lib/python3.10/site-packages (from displaycal) (1.8.0)
Requirement already satisfied: certifi in /usr/lib/python3.10/site-packages (from displaycal) (2022.9.24)
Requirement already satisfied: build in /usr/lib/python3.10/site-packages (from displaycal) (0.9.0)
Requirement already satisfied: zeroconf in /usr/lib/python3.10/site-packages (from displaycal) (0.39.4)
Requirement already satisfied: PyChromecast in ./.local/lib/python3.10/site-packages (from displaycal) (12.1.4)
Requirement already satisfied: numpy in /usr/lib/python3.10/site-packages (from displaycal) (1.23.4)
Requirement already satisfied: pep517>=0.9.1 in /usr/lib/python3.10/site-packages (from build->displaycal) (0.13.0)
Requirement already satisfied: packaging>=19.0 in /usr/lib/python3.10/site-packages (from build->displaycal) (21.3)
Requirement already satisfied: tomli>=1.0.0 in /usr/lib/python3.10/site-packages (from build->displaycal) (2.0.1)
Requirement already satisfied: casttube>=0.2.0 in ./.local/lib/python3.10/site-packages (from PyChromecast->displaycal) (0.2.1)
Requirement already satisfied: protobuf<4,>=3.19.1 in ./.local/lib/python3.10/site-packages (from PyChromecast->displaycal) (3.20.1)
Requirement already satisfied: async_timeout>=4.0.1 in /usr/lib/python3.10/site-packages (from zeroconf->displaycal) (4.0.2)
Requirement already satisfied: ifaddr>=0.1.7 in /usr/lib/python3.10/site-packages (from zeroconf->displaycal) (0.2.0)
Requirement already satisfied: six in /usr/lib/python3.10/site-packages (from wxPython->displaycal) (1.16.0)
Requirement already satisfied: requests in /usr/lib/python3.10/site-packages (from casttube>=0.2.0->PyChromecast->displaycal) (2.28.1)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /usr/lib/python3.10/site-packages (from packaging>=19.0->build->displaycal) (3.0.9)
Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3.10/site-packages (from requests->casttube>=0.2.0->PyChromecast->displaycal) (3.4)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/lib/python3.10/site-packages (from requests->casttube>=0.2.0->PyChromecast->displaycal) (1.26.12)
Building wheels for collected packages: displaycal
  Building wheel for displaycal (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for displaycal (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [61 lines of output]
      /tmp/pip-build-env-31kiar7l/overlay/lib/python3.10/site-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
        warnings.warn(msg, warning_class)
      DisplayCAL/RealDisplaySizeMM.c: Dans la fonction « get_displays »:
      DisplayCAL/RealDisplaySizeMM.c:871:61: attention: les cibles pointées dans le passage de l'argument 11 de « XRRGetOutputProperty » diffèrent dans la plage signée [-Wpointer-sign]
        871 |                                     &ret_type, &ret_format, &ret_len, &ret_togo, &atomv) == Success
            |                                                             ^~~~~~~~
            |                                                             |
            |                                                             long int *
      Dans le fichier inclus depuis DisplayCAL/RealDisplaySizeMM.c:33:
      /usr/include/X11/extensions/Xrandr.h:340:38: note: « long unsigned int * » attendu mais l'argument est de type « long int * »
        340 |                       unsigned long *nitems, unsigned long *bytes_after,
            |                       ~~~~~~~~~~~~~~~^~~~~~
      DisplayCAL/RealDisplaySizeMM.c:871:71: attention: passage de l'argument 12 de « XRRGetOutputProperty » depuis un type pointeur incompatible [-Wincompatible-pointer-types]
        871 |                                     &ret_type, &ret_format, &ret_len, &ret_togo, &atomv) == Success
            |                                                                       ^~~~~~~~~
            |                                                                       |
            |                                                                       long unsigned int **
      /usr/include/X11/extensions/Xrandr.h:340:61: note: « long unsigned int * » attendu mais l'argument est de type « long unsigned int ** »
        340 |                       unsigned long *nitems, unsigned long *bytes_after,
            |                                              ~~~~~~~~~~~~~~~^~~~~~~~~~~
      DisplayCAL/RealDisplaySizeMM.c:1036:53: attention: les cibles pointées dans le passage de l'argument 10 de « XGetWindowProperty » diffèrent dans la plage signée [-Wpointer-sign]
       1036 |                             &ret_type, &ret_format, &ret_len, &ret_togo, &atomv) == Success
            |                                                     ^~~~~~~~
            |                                                     |
            |                                                     long int *
      Dans le fichier inclus depuis DisplayCAL/RealDisplaySizeMM.c:27:
      /usr/include/X11/Xlib.h:2696:5: note: « long unsigned int * » attendu mais l'argument est de type « long int * »
       2696 |     unsigned long*      /* nitems_return */,
            |     ^~~~~~~~~~~~~~
      DisplayCAL/RealDisplaySizeMM.c:1036:63: attention: les cibles pointées dans le passage de l'argument 11 de « XGetWindowProperty » diffèrent dans la plage signée [-Wpointer-sign]
       1036 |                             &ret_type, &ret_format, &ret_len, &ret_togo, &atomv) == Success
            |                                                               ^~~~~~~~~
            |                                                               |
            |                                                               long int *
      /usr/include/X11/Xlib.h:2697:5: note: « long unsigned int * » attendu mais l'argument est de type « long int * »
       2697 |     unsigned long*      /* bytes_after_return */,
            |     ^~~~~~~~~~~~~~
      DisplayCAL/RealDisplaySizeMM.c: Dans la fonction « enumerate_displays »:
      DisplayCAL/RealDisplaySizeMM.c:1364:56: attention: les cibles pointées dans le passage de l'argument 1 de « PyBytes_FromStringAndSize » diffèrent dans la plage signée [-Wpointer-sign]
       1364 |               (value = PyString_FromStringAndSize(dp[i]->edid, dp[i]->edid_len)) != NULL) {
            |                                                   ~~~~~^~~~~~
            |                                                        |
            |                                                        unsigned char *
      Dans le fichier inclus depuis /usr/include/python3.10/Python.h:82,
                       depuis DisplayCAL/RealDisplaySizeMM.c:1:
      /usr/include/python3.10/bytesobject.h:34:50: note: « const char * » attendu mais l'argument est de type « unsigned char * »
         34 | PyAPI_FUNC(PyObject *) PyBytes_FromStringAndSize(const char *, Py_ssize_t);
            |                                                  ^~~~~~~~~~~~
      ['bdist_wheel', '--dist-dir', '/tmp/pip-wheel-f9imyyb7/tmpcdlze0uu']
      *** /usr/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py bdist_wheel --dist-dir /tmp/pip-wheel-f9imyyb7/tmpcdlze0uu
      using distutils
      desktopfile: /tmp/pip-install-n7miqqv7/displaycal_b9c1ab02a3224282bfb9957d66c3279f/DisplayCAL/../misc/displaycal.desktop
      desktopfile: /tmp/pip-install-n7miqqv7/displaycal_b9c1ab02a3224282bfb9957d66c3279f/DisplayCAL/../misc/displaycal-3dlut-maker.desktop
      desktopfile: /tmp/pip-install-n7miqqv7/displaycal_b9c1ab02a3224282bfb9957d66c3279f/DisplayCAL/../misc/displaycal-apply-profiles.desktop
      desktopfile: /tmp/pip-install-n7miqqv7/displaycal_b9c1ab02a3224282bfb9957d66c3279f/DisplayCAL/../misc/displaycal-curve-viewer.desktop
      desktopfile: /tmp/pip-install-n7miqqv7/displaycal_b9c1ab02a3224282bfb9957d66c3279f/DisplayCAL/../misc/displaycal-profile-info.desktop
      desktopfile: /tmp/pip-install-n7miqqv7/displaycal_b9c1ab02a3224282bfb9957d66c3279f/DisplayCAL/../misc/displaycal-scripting-client.desktop
      desktopfile: /tmp/pip-install-n7miqqv7/displaycal_b9c1ab02a3224282bfb9957d66c3279f/DisplayCAL/../misc/displaycal-synthprofile.desktop
      desktopfile: /tmp/pip-install-n7miqqv7/displaycal_b9c1ab02a3224282bfb9957d66c3279f/DisplayCAL/../misc/displaycal-testchart-editor.desktop
      desktopfile: /tmp/pip-install-n7miqqv7/displaycal_b9c1ab02a3224282bfb9957d66c3279f/DisplayCAL/../misc/displaycal-vrml-to-x3d-converter.desktop
      error: can't copy '/tmp/pip-install-n7miqqv7/displaycal_b9c1ab02a3224282bfb9957d66c3279f/DisplayCAL/../dist/net.displaycal.DisplayCAL.appdata.xml': doesn't exist or not a regular file
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for displaycal
Failed to build displaycal
ERROR: Could not build wheels for displaycal, which is required to install pyproject.toml-based projects`

If you could help me. Thanks to you.

eoyilmaz commented 1 year ago

Thank you for reporting, that's interesting I didn't try installing it on a LInux distro to be honest, it is installing fine on MacOS. I'll look in to this asap 👍

ignace72 commented 1 year ago

Hello, eoyilmaz. Thank you for your answer. I have tried to update DisplayCAL on the following distributions: Debian, Fedora, Linux Mint, Manjaro Linux, openSUSE Leap, openSUSE Tumbleweed and Xubuntu without success. Thanks for the work.

ghost commented 1 year ago

error: can't copy '/tmp/pip-install-n7miqqv7/displaycal_b9c1ab02a3224282bfb9957d66c3279f/DisplayCAL/../dist/net.displaycal.DisplayCAL.appdata.xml': doesn't exist or not a regular file

I can reproduce it locally.

It happens because create_appdata and possibly buildservice are not triggered in setup.py.

    create_appdata = (
        (appdata or "install" in sys.argv[1:] or "sdist" in sys.argv[1:])
        and not help
        and not dry_run
    )

    if (
        "sdist" in sys.argv[1:]
        or "install" in sys.argv[1:]
        or "bdist_deb" in sys.argv[1:]
    ) and not help:
        buildservice = True

As you can see, ['bdist_wheel', '--dist-dir', '/tmp/pip-wheel-f9imyyb7/tmpcdlze0uu'] do not fall under those conditions to make appdata.

ignace72 commented 1 year ago

Good evening, kruceter. Okay. Thank you for this. As this is for my tutorial for DisplayCAL I'll wait until there is a fix because I doubt that everyone can fix this by hand because many users are not GNU/Linux specialists but photographers.

eoyilmaz commented 1 year ago

It seems to be related with my commit at 5e9e42f0

eoyilmaz commented 1 year ago

Hmm... now I'm thinking that this was done back in April and we had a ton of releases since then. It shouldn't be this but something else between 3.9.8 and 3.9.9.

eoyilmaz commented 1 year ago

Oh it seems that it is caused by 4ea5bca2c2fac0f5d58a23457f33492687b15fd7

@kruceter I said that the setup.py is full with quirks and it seems we just hit one of them. Reverting that commit...

eoyilmaz commented 1 year ago

fixed with acc89e5 and released 3.9.10 to PyPI

ignace72 commented 1 year ago

Good evening, eoyilmaz. I don't know if it helps but for Debian and Fedora, I had to update pip. This is the first time that DisplayCAL installation requires this. Sorry I can't help you more than but I'm not a computer coder.

ghost commented 1 year ago

The problem with appdata is still present even after reverting my commit.

dispcalgui.txt

ignace72 commented 1 year ago

eoyilmaz has released version 3.9.10.

It installs on ArchLinux, Manjaro Linux, openSUSE Leap and openSUSE Tumbleweed.

It does not install on Debian, Fedora, Linux Mint, and Ubuntu.

I have not tested it on other distributions.

The issue for version 3.9.10 is here : https://github.com/eoyilmaz/displaycal-py3/issues/211

ghost commented 1 year ago

@ignace72 this issue with appdata is not gone for me with 3.9.10.

I do not use these distros you mentioned.

ignace72 commented 1 year ago

@kruceter If I may ask, which distro do you use, could I install it in a virtual machine? Thank you.

eoyilmaz commented 1 year ago

@ignace72 I'll look in to installation problems in Fedora this week, can we open a new ticket with a real error message aah I see that you already did 👍

ignace72 commented 1 year ago

Hello, eoyilmaz. Thank you for your attention. I can't have all the distributions in virtual machine, but I try to have a certain number of them (this number grows as I am asked) because I find your work important.