fink / fink-distributions

Package descriptions and patches for Fink
23 stars 38 forks source link

docutils-py-0.14 doesn't build on macOS12 #931

Open nieder opened 1 year ago

nieder commented 1 year ago

The latest sets of macOS no longer ship with /usr/bin/python (v2). During build phase, this command:

PYTHONPATH=..:../docutils/utils ../tools/rst2html.py $i $htmldoc

tries to run with #!/usr/bin/env python, which fails. Forcing it to use %p/bin/python%type_pkg[python] fails with this error for at least python3.7 (earliest I can try with macOS 12.6):

Making BUGS.html
Traceback (most recent call last):
  File "tools/rst2html.py", line 17, in <module>
    from docutils.core import publish_cmdline, default_description
  File "/opt/sw/build.build/docutils-py37-0.15-1/docutils-0.15/docutils/__init__.py", line 91, in <module>
    class ApplicationError(StandardError): pass
NameError: name 'StandardError' is not defined

There's newer docutils releases that indicate native support for newer versions of python.

dmacks commented 1 year ago

It's a pretty notable bug, a -pyXX tied to a fink pythonXX language pakage trying to use a python other than fink's interp specific to that XX.

The tarball supplies tools/*.py with #!/usr/bin/env python and then the build process adjusts them to the correct python interp (here for -py27):

creating build/scripts-2.7
copying and adjusting tools/rst2html.py -> build/scripts-2.7

So maybe the build process should be running those build/scripts-X.X tools instead of the originals in tools/ ?

dmacks commented 1 year ago

Here's how to fix bug I noted: correct-python-interp.patch

It should fix FTBFS for -py27 on all platforms, and trigger FTBFS for -py3X on all platforms, so now it's all consistent, and should be incorporated into any future packaging if *Script need to run those .py scripts

dmacks commented 1 year ago

This is the key upstream patch that claims to fix for python3 compat. It does change the 'StandardError' as mentioned in the original error message.

dmacks commented 1 year ago

Latest upstream 0.19 fails for all pythons I tried (-py27, -py34, -py310), each in a totally different way. I'm out.

TheSin- commented 1 year ago

any progress on this I need docutils-py3xx

Has anyone looked at @dhomeier fixes so we can accept them?