Skip to content

pypy: fix missing LDCXXSHARED in sysconfig.get_config_vars()#240300

Closed
SuperSandro2000 wants to merge 1 commit intoNixOS:stagingfrom
SuperSandro2000:pypy/pillow
Closed

pypy: fix missing LDCXXSHARED in sysconfig.get_config_vars()#240300
SuperSandro2000 wants to merge 1 commit intoNixOS:stagingfrom
SuperSandro2000:pypy/pillow

Conversation

@SuperSandro2000
Copy link
Member

@SuperSandro2000 SuperSandro2000 commented Jun 28, 2023

leading to a type error when compiling Pillow

This fixes the same underlying issue as #240199 but pypy wide.

pillow> warning: no files found matching '*.c'
pillow> warning: no files found matching '*.h'
pillow> warning: no files found matching '*.sh'
pillow> warning: no files found matching '*.txt'
pillow> warning: no previously-included files found matching '.appveyor.yml'
pillow> warning: no previously-included files found matching '.clang-format'
pillow> warning: no previously-included files found matching '.coveragerc'
pillow> warning: no previously-included files found matching '.editorconfig'
pillow> warning: no previously-included files found matching '.readthedocs.yml'
pillow> warning: no previously-included files found matching 'codecov.yml'
pillow> warning: no previously-included files found matching 'renovate.json'
pillow> warning: no previously-included files matching '.git*' found anywhere in distribution
pillow> warning: no previously-included files matching '*.pyc' found anywhere in distribution
pillow> warning: no previously-included files matching '*.so' found anywhere in distribution
pillow> no previously-included directories found matching '.ci'
pillow> adding license file 'LICENSE'
pillow> writing manifest file 'src/Pillow.egg-info/SOURCES.txt'
pillow> running build_ext
pillow> Traceback (most recent call last):
pillow>   File "/build/Pillow-9.4.0/nix_run_setup", line 8, in <module>
pillow>     exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
pillow>   File "setup.py", line 993, in <module>
pillow>     setup(
pillow>   File "/nix/store/rm4pw7i59733cs8frim5vr6221rl20ka-pypy3.9-setuptools-67.4.0/lib/pypy3.9/site-packages/setuptools/__init__.py", line 108, in setup
pillow>     return distutils.core.setup(**attrs)
pillow>   File "/nix/store/rm4pw7i59733cs8frim5vr6221rl20ka-pypy3.9-setuptools-67.4.0/lib/pypy3.9/site-packages/setuptools/_distutils/core.py", line 185, in setup
pillow>     return run_commands(dist)
pillow>   File "/nix/store/rm4pw7i59733cs8frim5vr6221rl20ka-pypy3.9-setuptools-67.4.0/lib/pypy3.9/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
pillow>     dist.run_commands()
pillow>   File "/nix/store/rm4pw7i59733cs8frim5vr6221rl20ka-pypy3.9-setuptools-67.4.0/lib/pypy3.9/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
pillow>     self.run_command(cmd)
pillow>   File "/nix/store/rm4pw7i59733cs8frim5vr6221rl20ka-pypy3.9-setuptools-67.4.0/lib/pypy3.9/site-packages/setuptools/dist.py", line 1221, in run_command
pillow>     super().run_command(command)
pillow>   File "/nix/store/rm4pw7i59733cs8frim5vr6221rl20ka-pypy3.9-setuptools-67.4.0/lib/pypy3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
pillow>     cmd_obj.run()
pillow>   File "/nix/store/amp1rx9vihijrzgfy04arxa3wz6cjrq3-pypy3.9-wheel-0.38.4/lib/pypy3.9/site-packages/wheel/bdist_wheel.py", line 325, in run
pillow>     self.run_command("build")
pillow>   File "/nix/store/rm4pw7i59733cs8frim5vr6221rl20ka-pypy3.9-setuptools-67.4.0/lib/pypy3.9/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
pillow>     self.distribution.run_command(command)
pillow>   File "/nix/store/rm4pw7i59733cs8frim5vr6221rl20ka-pypy3.9-setuptools-67.4.0/lib/pypy3.9/site-packages/setuptools/dist.py", line 1221, in run_command
pillow>     super().run_command(command)
pillow>   File "/nix/store/rm4pw7i59733cs8frim5vr6221rl20ka-pypy3.9-setuptools-67.4.0/lib/pypy3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
pillow>     cmd_obj.run()
pillow>   File "/nix/store/rm4pw7i59733cs8frim5vr6221rl20ka-pypy3.9-setuptools-67.4.0/lib/pypy3.9/site-packages/setuptools/_distutils/command/build.py", line 131, in run
pillow>     self.run_command(cmd_name)
pillow>   File "/nix/store/rm4pw7i59733cs8frim5vr6221rl20ka-pypy3.9-setuptools-67.4.0/lib/pypy3.9/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
pillow>     self.distribution.run_command(command)
pillow>   File "/nix/store/rm4pw7i59733cs8frim5vr6221rl20ka-pypy3.9-setuptools-67.4.0/lib/pypy3.9/site-packages/setuptools/dist.py", line 1221, in run_command
pillow>     super().run_command(command)
pillow>   File "/nix/store/rm4pw7i59733cs8frim5vr6221rl20ka-pypy3.9-setuptools-67.4.0/lib/pypy3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
pillow>     cmd_obj.run()
pillow>   File "/nix/store/rm4pw7i59733cs8frim5vr6221rl20ka-pypy3.9-setuptools-67.4.0/lib/pypy3.9/site-packages/setuptools/command/build_ext.py", line 84, in run
pillow>     _build_ext.run(self)
pillow>   File "/nix/store/rm4pw7i59733cs8frim5vr6221rl20ka-pypy3.9-setuptools-67.4.0/lib/pypy3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 315, in run
pillow>     customize_compiler(self.compiler)
pillow>   File "/nix/store/rm4pw7i59733cs8frim5vr6221rl20ka-pypy3.9-setuptools-67.4.0/lib/pypy3.9/site-packages/setuptools/_distutils/sysconfig.py", line 337, in customize_compiler
pillow>     ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
pillow> TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@SuperSandro2000 SuperSandro2000 requested a review from FRidh as a code owner June 28, 2023 08:35
@github-actions github-actions bot added the 6.topic: python Python is a high-level, general-purpose programming language. label Jun 28, 2023
@SuperSandro2000 SuperSandro2000 changed the base branch from master to staging June 28, 2023 08:35
@FRidh
Copy link
Member

FRidh commented Jun 28, 2023

And revert #240199?

@ofborg ofborg bot requested a review from andersk June 28, 2023 08:54
@ofborg ofborg bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Jun 28, 2023
@SuperSandro2000
Copy link
Member Author

And revert #240199?

That PR becomes obsolete with this one.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/2868

@thiagokokada
Copy link
Contributor

This PR is failing in CI.

@SuperSandro2000
Copy link
Member Author

That's probably because it depends on the other PRs I have opened.

leading to a type error when compiling Pillow:
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

Co-authored-by: Sophie Tauchert <1221984+999eagle@users.noreply.github.com>
@NickCao
Copy link
Member

NickCao commented Jan 14, 2024

Is this a pypy issue?

@SuperSandro2000
Copy link
Member Author

I am not sure, it could be but it could also be nixos related.

@wegank wegank added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 4, 2024
@FliegendeWurst FliegendeWurst mentioned this pull request Apr 8, 2025
8 tasks
@SuperSandro2000 SuperSandro2000 deleted the pypy/pillow branch May 17, 2025 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: python Python is a high-level, general-purpose programming language. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants