Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Inserting setuptools and wheel imports at top of setup.py files breaks modules with __future__ imports in setup.py #54

Open
boldfield opened this issue Jun 27, 2023 · 0 comments

Comments

@boldfield
Copy link

Many modules use from __future__ imports in setup.py. An example of this occurring can be seen here:

❯ python setup.py bdist_xar --download
...
Successfully downloaded hvac pyhcl requests certifi charset-normalizer idna urllib3
  File "/tmp/tmpotmbe2tz/pyhcl-0.4.4/setup.py", line 5
    from __future__ import print_function
    ^
SyntaxError: from __future__ imports must occur at the beginning of the file
...

xar/xar/pip_installer.py

Lines 116 to 117 in a67d37c

f.write("import setuptools\n")
f.write("import wheel\n")

@boldfield boldfield changed the title Inserting setuptools and wheel imports at tope of setup.py files breaks modules with __future__ imports in setup.py Inserting setuptools and wheel imports at top of setup.py files breaks modules with __future__ imports in setup.py Jun 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant