Opened 13 months ago

Closed 12 months ago

Last modified 12 months ago

#68466 closed defect (fixed)

py27-bcrypt @3.1.7, py27-cffi @1.16.0: This CFFI feature requires setuptools on Python >= 3.12. The setuptools module is missing or non-functional.

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: stromnov (Andrey Stromnov)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: Cc: herbygillot (Herby Gillot), cooljeanius (Eric Gallager)
Port: py27-bcrypt py27-cffi

Description

py27-bcrypt @3.1.7 fails to build from source for me on macOS Sonoma x86_64:

Traceback (most recent call last):
  File "setup.py", line 240, in <module>
    **keywords_with_side_effects(sys.argv)
  File "/opt/bblocal/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/__init__.py", line 162, in setup
    return distutils.core.setup(**attrs)
  File "/opt/bblocal/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 111, in setup
    _setup_distribution = dist = klass(attrs)
  File "/opt/bblocal/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/dist.py", line 448, in __init__
    k: v for k, v in attrs.items()
  File "/opt/bblocal/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 287, in __init__
    self.finalize_options()
  File "/opt/bblocal/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/dist.py", line 740, in finalize_options
    ep(self)
  File "/opt/bblocal/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/dist.py", line 747, in _finalize_setup_keywords
    ep.load()(self, ep.name, value)
  File "/opt/bblocal/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cffi/setuptools_ext.py", line 216, in cffi_modules
    add_cffi_module(dist, cffi_module)
  File "/opt/bblocal/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cffi/setuptools_ext.py", line 71, in add_cffi_module
    _add_c_module(dist, ffi, module_name, source, source_extension, kwds)
  File "/opt/bblocal/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cffi/setuptools_ext.py", line 109, in _add_c_module
    from cffi._shimmed_dist_utils import Extension, log, mkpath
  File "/opt/bblocal/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cffi/_shimmed_dist_utils.py", line 16
    raise Exception("This CFFI feature requires setuptools on Python >= 3.12. The setuptools module is missing or non-functional.") from ex
                                                                                                                                       ^
SyntaxError: invalid syntax

I don't know why the error message (which comes from py27-cffi) mentions "Python >= 3.12"; this is Python 2.7. The file the error message is in is new in py27-cffi @1.16.0. Installing py27-cffi @1.15.1 works around the problem.

This issue came up for me today when trying to set up a macOS Sonoma buildbot worker since these ports are in the dependency chain for buildbot-slave-0.8. For now I will copy the old py-cffi @1.15.1 Portfile and files directory into the private ports collection that I use for the buildbot machines.

Change History (7)

comment:1 Changed 13 months ago by ryandesign (Ryan Carsten Schmidt)

I guess the actual error is SyntaxError: invalid syntax, but it occurred while trying to show a message specific to Python >= 3.12 which still seems off.

comment:2 Changed 13 months ago by jmroot (Joshua Root)

Cc: stromnov removed
Keywords: sonoma x86_64 removed
Owner: set to stromnov
Status: newassigned

Drop support for end-of-life Python versions (2.7, 3.6, 3.7).

https://cffi.readthedocs.io/en/latest/whatsnew.html

comment:3 Changed 12 months ago by tux-o-matic (Benjamin Merot)

This also blocks py27-cryptography which itself is a dependency for a bunch of other ports. Everybody might have dropped support for Python 2.7 for good reasons but there are still actively developed tools that have old references to Python 2.7 versions of libraries.

comment:4 Changed 12 months ago by jmroot (Joshua Root)

Resolution: fixed
Status: assignedclosed

In c05f80b73c95c2e9591f4577a0771bda0bb097ea/macports-ports (master):

py-cffi: use last supported version for py <= 3.7

Fixes: #68466

comment:5 Changed 12 months ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added

comment:6 Changed 12 months ago by cooljeanius (Eric Gallager)

For searchability purposes, this affects py27-pynacl, too

comment:7 in reply to:  3 Changed 12 months ago by cooljeanius (Eric Gallager)

Replying to tux-o-matic:

This also blocks py27-cryptography which itself is a dependency for a bunch of other ports. Everybody might have dropped support for Python 2.7 for good reasons but there are still actively developed tools that have old references to Python 2.7 versions of libraries.

See also: py27-paramiko, bzr, fdroidserver, and more.

Note: See TracTickets for help on using tickets.