Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python3.6 and earlier do not have annotations #156

Open
juliantos opened this issue Jun 22, 2023 · 3 comments
Open

Python3.6 and earlier do not have annotations #156

juliantos opened this issue Jun 22, 2023 · 3 comments

Comments

@juliantos
Copy link

https://github.com/danni/python-pkcs11/blob/e35e6c45e3dcaaa1511262121ff4ab6769de941e/setup.py#L57
to

'setuptools_scm ; python_version >= "3.7"'
'setuptools_scm < 7 ; python_version < "3.7"'

This fixes this error from occurring and still allows for python-pkcs11 to build:

Processing /home/user/python-pkcs11-0.7.0
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-req-build-nbtjcoj1/setup.py", line 60, in <module>
        test_suite='tests',
      File "/home/user/.pyenv/versions/3.6.15/lib/python3.6/site-packages/setuptools/__init__.py", line 143, in setup
        return distutils.core.setup(**attrs)
      File "/home/user/.pyenv/versions/3.6.15/lib/python3.6/distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/home/user/.pyenv/versions/3.6.15/lib/python3.6/site-packages/setuptools/dist.py", line 442, in __init__
        k: v for k, v in attrs.items()
      File "/home/user/.pyenv/versions/3.6.15/lib/python3.6/distutils/dist.py", line 281, in __init__
        self.finalize_options()
      File "/home/user/.pyenv/versions/3.6.15/lib/python3.6/site-packages/setuptools/dist.py", line 601, in finalize_options
        ep.load()(self, ep.name, value)
      File "/home/user/.pyenv/versions/3.6.15/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2346, in load
        return self.resolve()
      File "/home/user/.pyenv/versions/3.6.15/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2352, in resolve
        module = __import__(self.module_name, fromlist=['__name__'], level=0)
      File "/tmp/pip-req-build-nbtjcoj1/.eggs/setuptools_scm-7.1.0-py3.6.egg/setuptools_scm/__init__.py", line 5
        from __future__ import annotations
        ^
    SyntaxError: future feature annotations is not defined
@bhagwatvyas
Copy link

@jsantos18 have you been able to get around this issue?

@juliantos
Copy link
Author

If you manually specify which setuptools_scm to install via pip beforehand then it works on a fresh pip install.

@NiviPari
Copy link

NiviPari commented Dec 6, 2023

@jsantos18 Have introduced this already and tried , still getting the same issue : "setuptools_scm < 7"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants