Skip to content
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

setuptools build fails on upgrade for nixpkgs #261

Closed
toastal opened this issue Jun 6, 2023 · 5 comments
Closed

setuptools build fails on upgrade for nixpkgs #261

toastal opened this issue Jun 6, 2023 · 5 comments
Assignees

Comments

@toastal
Copy link

toastal commented Jun 6, 2023

Other formats (wheel, pyproject) all called for setuptools as input requirement despite the warnings. This latest version fails to build with the following output.

Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing setuptools-build-hook
Using setuptoolsBuildPhase
Using setuptoolsShellHook
Sourcing pip-install-hook
Using pipInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing python-namespaces-hook
Sourcing python-catch-conflicts-hook.sh
unpacking sources
unpacking source archive /nix/store/5ccf0s8x8dzdy566va1cnd817pw8c7wb-DisplayCAL-3.9.11.tar.gz
source root is DisplayCAL-3.9.11
setting SOURCE_DATE_EPOCH to timestamp 1685984878 of file DisplayCAL-3.9.11/setup.cfg
patching sources
configuring
no configure script, doing nothing
building
Executing setuptoolsBuildPhase
['bdist_wheel']
*** /build/DisplayCAL-3.9.11/nix_run_setup bdist_wheel
using distutils
desktopfile: /build/DisplayCAL-3.9.11/DisplayCAL/../misc/displaycal.desktop
desktopfile: /build/DisplayCAL-3.9.11/DisplayCAL/../misc/displaycal-3dlut-maker.desktop
desktopfile: /build/DisplayCAL-3.9.11/DisplayCAL/../misc/displaycal-apply-profiles.desktop
desktopfile: /build/DisplayCAL-3.9.11/DisplayCAL/../misc/displaycal-curve-viewer.desktop
desktopfile: /build/DisplayCAL-3.9.11/DisplayCAL/../misc/displaycal-profile-info.desktop
desktopfile: /build/DisplayCAL-3.9.11/DisplayCAL/../misc/displaycal-scripting-client.desktop
desktopfile: /build/DisplayCAL-3.9.11/DisplayCAL/../misc/displaycal-synthprofile.desktop
desktopfile: /build/DisplayCAL-3.9.11/DisplayCAL/../misc/displaycal-testchart-editor.desktop
desktopfile: /build/DisplayCAL-3.9.11/DisplayCAL/../misc/displaycal-vrml-to-x3d-converter.desktop
/nix/store/fifpcdabddbqy314jv3haghykqf9c1sz-python3.10-setuptools-67.4.0/lib/python3.10/site-packages/setuptools/config/setupcfg.py:520: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
  warnings.warn(msg, warning_class)
DisplayCAL/RealDisplaySizeMM.c: In function ‘get_displays’:
DisplayCAL/RealDisplaySizeMM.c:871:61: warning: pointer targets in passing argument 11 of ‘XRRGetOutputProperty’ differ in signedness [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wpointer-sign-Wpointer-sign8;;]
  871 |                                     &ret_type, &ret_format, &ret_len, &ret_togo, &atomv) == Success
      |                                                             ^~~~~~~~
      |                                                             |
      |                                                             long int *
In file included from DisplayCAL/RealDisplaySizeMM.c:33:
/nix/store/18i32xvnm6fzf2ls173va2n0vlmrcw3k-libXrandr-1.5.2-dev/include/X11/extensions/Xrandr.h:340:38: note: expected ‘long unsigned int *’ but argument is of type ‘long int *’
  340 |                       unsigned long *nitems, unsigned long *bytes_after,
      |                       ~~~~~~~~~~~~~~~^~~~~~
DisplayCAL/RealDisplaySizeMM.c:871:71: warning: passing argument 12 of ‘XRRGetOutputProperty’ from incompatible pointer type [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wincompatible-pointer-types-Wincompatible-pointer-types8;;]
  871 |                                     &ret_type, &ret_format, &ret_len, &ret_togo, &atomv) == Success
      |                                                                       ^~~~~~~~~
      |                                                                       |
      |                                                                       long unsigned int **
/nix/store/18i32xvnm6fzf2ls173va2n0vlmrcw3k-libXrandr-1.5.2-dev/include/X11/extensions/Xrandr.h:340:61: note: expected ‘long unsigned int *’ but argument is of type ‘long unsigned int **’
  340 |                       unsigned long *nitems, unsigned long *bytes_after,
      |                                              ~~~~~~~~~~~~~~~^~~~~~~~~~~
DisplayCAL/RealDisplaySizeMM.c:1036:53: warning: pointer targets in passing argument 10 of ‘XGetWindowProperty’ differ in signedness [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wpointer-sign-Wpointer-sign8;;]
 1036 |                             &ret_type, &ret_format, &ret_len, &ret_togo, &atomv) == Success
      |                                                     ^~~~~~~~
      |                                                     |
      |                                                     long int *
In file included from DisplayCAL/RealDisplaySizeMM.c:27:
/nix/store/jpsap6vd1cjbb60j3g6sjx57iyfvblyd-libX11-1.8.4-dev/include/X11/Xlib.h:2700:5: note: expected ‘long unsigned int *’ but argument is of type ‘long int *’
 2700 |     unsigned long*      /* nitems_return */,
      |     ^~~~~~~~~~~~~~
DisplayCAL/RealDisplaySizeMM.c:1036:63: warning: pointer targets in passing argument 11 of ‘XGetWindowProperty’ differ in signedness [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wpointer-sign-Wpointer-sign8;;]
 1036 |                             &ret_type, &ret_format, &ret_len, &ret_togo, &atomv) == Success
      |                                                               ^~~~~~~~~
      |                                                               |
      |                                                               long int *
/nix/store/jpsap6vd1cjbb60j3g6sjx57iyfvblyd-libX11-1.8.4-dev/include/X11/Xlib.h:2701:5: note: expected ‘long unsigned int *’ but argument is of type ‘long int *’
 2701 |     unsigned long*      /* bytes_after_return */,
      |     ^~~~~~~~~~~~~~
DisplayCAL/RealDisplaySizeMM.c: In function ‘enumerate_displays’:
DisplayCAL/RealDisplaySizeMM.c:1364:56: warning: pointer targets in passing argument 1 of ‘PyBytes_FromStringAndSize’ differ in signedness [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wpointer-sign-Wpointer-sign8;;]
 1364 |               (value = PyString_FromStringAndSize(dp[i]->edid, dp[i]->edid_len)) != NULL) {
      |                                                   ~~~~~^~~~~~
      |                                                        |
      |                                                        unsigned char *
In file included from /nix/store/yhpwdgqsrfm5r4x7ycbgj04aq7063rli-python3-3.10.11/include/python3.10/Python.h:82,
                 from DisplayCAL/RealDisplaySizeMM.c:1:
/nix/store/yhpwdgqsrfm5r4x7ycbgj04aq7063rli-python3-3.10.11/include/python3.10/bytesobject.h:34:50: note: expected ‘const char *’ but argument is of type ‘unsigned char *’
   34 | PyAPI_FUNC(PyObject *) PyBytes_FromStringAndSize(const char *, Py_ssize_t);
      |                                                  ^~~~~~~~~~~~
/nix/store/fifpcdabddbqy314jv3haghykqf9c1sz-python3.10-setuptools-67.4.0/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
error: can't copy '/build/DisplayCAL-3.9.11/DisplayCAL/../dist/net.displaycal.DisplayCAL.appdata.xml': doesn't exist or not a regular file
/nix/store/0swa08bbslxc9wbfixbcd196aa1117lx-stdenv-linux/setup: line 1586: pop_var_context: head of shell_variables not a function context

I'm responsible for maintaining the package as a DisplayCAL user, but not a Python developer. I tried upgrading to Python 3.11 too but got the same error.

@eoyilmaz
Copy link
Owner

eoyilmaz commented Jun 6, 2023

Hey @p5k369 starting with this issue I want to use feature branches (and get a little more active with the development). I'm not sure if this is the correct name by the way. What I mean is that we are going to fix each issue (or group of issues) in their own branches and merge that branch to the develop with a proper PR. It is more akin to how I normally work, and it will be cleaner too. What do you think?

I already introduced branch protection rules for both the develop and main branches.

Ah, of course I'm talking as if you are directly using this repository for your development. Otherwise, you are already creating PRs and branches in that case are not very relevant, isn't it.

@eoyilmaz eoyilmaz self-assigned this Jun 6, 2023
@eoyilmaz
Copy link
Owner

eoyilmaz commented Jun 6, 2023

@toastal I'm not sure how you prepare the package. But, even though I'm under MacOS, extracting the tar.gz file content and creating a virtualenv and running python -m build worked for me (with a little exception of creating the missing "debian.rules" file, which was weird tbh), and I se the net.displaycal.DisplayCAL.appdata.xml get created. I think your build script is still trying to build directly through setup.py (something like python setup.py install) which is not how DisplayCAL suppose to be installed.

Also, installing the tar.gz file directly to a virtualenv (pip install DisplayCAL-3.9.11.tar.gz) worked for me without any issues on Python 3.10. But Python 3.11 has the attrdict3 problem of wxPython 4.2.0 and is not working right now.

@p5k369
Copy link
Collaborator

p5k369 commented Jun 7, 2023

Hey @p5k369 starting with this issue I want to use feature branches (and get a little more active with the development). I'm not sure if this is the correct name by the way. What I mean is that we are going to fix each issue (or group of issues) in their own branches and merge that branch to the develop with a proper PR. It is more akin to how I normally work, and it will be cleaner too. What do you think?

Sure, thats also how we are doing it at work. And as you mentioned, that's what I do anyway when I make a pull request.

AndrewKvalheim added a commit to AndrewKvalheim/nixpkgs that referenced this issue Nov 19, 2023
- Additional dependencies as newly specified in `setup.cfg`
- Workaround to eoyilmaz/displaycal-py3#261 avoids:

    error: can't copy '/build/DisplayCAL-3.9.11/DisplayCAL/../dist/net.displaycal.DisplayCAL.appdata.xml': doesn't exist or not a regular file
Mic92 pushed a commit to NixOS/nixpkgs that referenced this issue Nov 19, 2023
- Additional dependencies as newly specified in `setup.cfg`
- Workaround to eoyilmaz/displaycal-py3#261 avoids:

    error: can't copy '/build/DisplayCAL-3.9.11/DisplayCAL/../dist/net.displaycal.DisplayCAL.appdata.xml': doesn't exist or not a regular file
@eoyilmaz
Copy link
Owner

Closing this because of inactivity... Open it back if required.

@toastal
Copy link
Author

toastal commented Mar 19, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

3 participants