Xpra-org / gtk-osx-build

Build setup to help building the Mac OS X port of GTK+
http://gtk-osx.sourceforge.net/
0 stars 2 forks source link

PyYAML 6.0.1 doesn't build with Cython 3.0.0 + Python 3.11 #30

Closed totaam closed 8 months ago

totaam commented 1 year ago

Amusing: https://github.com/yaml/pyyaml/pull/731#issuecomment-1652156219 and https://github.com/yaml/pyyaml/issues/601

And there are serious CVEs in older versions.. ie: CVE-2020-14343 Some people claim that 6.0.1 fixes things. It doesn't work here:

*** Building python3-yaml *** [92/138]
python3 setup.py build --build-base /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1
running build
running build_py
creating /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1
creating /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311
creating /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
copying lib/yaml/scanner.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
copying lib/yaml/error.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
copying lib/yaml/constructor.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
copying lib/yaml/composer.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
copying lib/yaml/events.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
copying lib/yaml/__init__.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
copying lib/yaml/representer.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
copying lib/yaml/tokens.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
copying lib/yaml/dumper.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
copying lib/yaml/cyaml.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
copying lib/yaml/parser.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
copying lib/yaml/reader.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
copying lib/yaml/loader.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
copying lib/yaml/resolver.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
copying lib/yaml/serializer.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
copying lib/yaml/nodes.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
copying lib/yaml/emitter.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
creating /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/_yaml
copying lib/_yaml/__init__.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/_yaml
warning: build_py: byte-compiling is disabled, skipping.

running build_ext
Traceback (most recent call last):
  File "/Users/macos/gtk/source/PyYAML-6.0.1/setup.py", line 289, in <module>
    setup(
  File "/Users/macos/gtk/inst/lib/python3.11/site-packages/setuptools/__init__.py", line 107, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/macos/gtk/inst/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)
           ^^^^^^^^^^^^^^^^^^
  File "/Users/macos/gtk/inst/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/Users/macos/gtk/inst/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
    self.run_command(cmd)
  File "/Users/macos/gtk/inst/lib/python3.11/site-packages/setuptools/dist.py", line 1234, in run_command
    super().run_command(command)
  File "/Users/macos/gtk/inst/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/Users/macos/gtk/inst/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 131, in run
    self.run_command(cmd_name)
  File "/Users/macos/gtk/inst/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
    self.distribution.run_command(command)
  File "/Users/macos/gtk/inst/lib/python3.11/site-packages/setuptools/dist.py", line 1234, in run_command
    super().run_command(command)
  File "/Users/macos/gtk/inst/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/Users/macos/gtk/source/PyYAML-6.0.1/setup.py", line 191, in run
    _build_ext.run(self)
  File "/Users/macos/gtk/inst/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
    self.build_extensions()
  File "/Users/macos/gtk/source/PyYAML-6.0.1/setup.py", line 233, in build_extensions
    ext.sources = self.cython_sources(ext.sources, ext)
                  ^^^^^^^^^^^^^^^^^^^
  File "/Users/macos/gtk/inst/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__
    raise AttributeError(attr)
AttributeError: cython_sources
totaam commented 8 months ago

There is a workaround which could be added as a patch if someone cared: https://github.com/yaml/pyyaml/issues/601#issuecomment-1873741002

From now on, the MacOS builds just won't have yaml, as that's easier.