xar icon indicating copy to clipboard operation
xar copied to clipboard

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

Open boldfield opened this issue 1 year ago • 0 comments

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
...

https://github.com/facebookincubator/xar/blob/a67d37cf31c0ef7699a6659335db3e1cc3ec9593/xar/pip_installer.py#L116-L117

boldfield avatar Jun 27 '23 23:06 boldfield