ionelmc/python-lazy-object-proxy

syntax error for ARM centos7.9 and centos8.2 python3.6

jsofri opened this issue · 2 comments

interpreter: python3.6
OS: centos7.9/centos8.2
arch: ARM

there's no wheel when pip install, hence there is a build from source which causes a syntax error. the installation is a part of another module (pylint)
When installed on x86 (same python interpreter and OSs) there is no problem

logs is the same for both OSs

Collecting lazy-object-proxy>=1.4.0 (from astroid<=2.12.0-dev0,>=2.11.5->pylint)
  Downloading https://files.pythonhosted.org/packages/75/93/3fc1cc28f71dd10b87a53b9d809602d7730e84cc4705a062def286232a9c/lazy-object-proxy-1.7.1.tar.gz (41kB)
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-kj2640cd/lazy-object-proxy/setup.py", line 146, in <module>
        distclass=BinaryDistribution,
      File "/usr/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib64/python3.6/distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/usr/lib/python3.6/site-packages/setuptools/dist.py", line 370, in __init__
        k: v for k, v in attrs.items()
      File "/usr/lib64/python3.6/distutils/dist.py", line 281, in __init__
        self.finalize_options()
      File "/usr/lib/python3.6/site-packages/setuptools/dist.py", line 529, in finalize_options
        ep.load()(self, ep.name, value)
      File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2318, in load
        return self.resolve()
      File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2324, in resolve
        module = __import__(self.module_name, fromlist=['__name__'], level=0)
      File "/tmp/pip-build-kj2640cd/lazy-object-proxy/.eggs/setuptools_scm-7.0.5-py3.6.egg/setuptools_scm/__init__.py", line 5
        from __future__ import annotations
        ^
    SyntaxError: future feature annotations is not defined

after some more research, seems it has to do with astroid version update
closing thread
pylint-dev/astroid#1713

This in theory could be solved by having an upper constraint on setuptools_scm but unfortunately that brings in other problems.

A workaround on your side could be to pre-install setuptools-scm in your build env so it's not downloaded automatically using some broken resolver. Why is the resolver broken? Maybe your pip/setuptools are too old.