berkerpeksag / astor

Python AST read/write
https://pypi.org/project/astor/
BSD 3-Clause "New" or "Revised" License
793 stars 101 forks source link

0.8.1 keeps failing with NotADirectoryError #198

Open clbr opened 3 years ago

clbr commented 3 years ago

When installing 0.8.1 using the recommended way, "python3 setup.py build; sudo python3 setup.py install", it keeps failing when trying to import it, with a NotADirectoryError.

File "/usr/local/lib/python3.7/dist-packages/astor-0.8.1-py3.7.egg/astor/init.py", line 24, in NotADirectoryError: [Errno 20] Not a directory: '/usr/local/lib/python3.7/dist-packages/astor-0.8.1-py3.7.egg/astor/VERSION'

I have verifed this happens on both the latest python 3.9.4 and the 3.7.3 that comes on Debian 10.

clbr commented 3 years ago

Hm, github and markdown. Trying again

  File "/usr/local/lib/python3.7/dist-packages/astor-0.8.1-py3.7.egg/astor/__init__.py", line 24, in <module>
NotADirectoryError: [Errno 20] Not a directory: '/usr/local/lib/python3.7/dist-packages/astor-0.8.1-py3.7.egg/astor/VERSION'
clbr commented 3 years ago

It's been discovered this only affects the 0.8.1 release tarball on pypi.org.

clbr commented 3 years ago

So #176 fixed this (but somehow google found nothing for "astor" "notadirectoryerror"), and the issue is that the only available release tarball is buggy.