shiv icon indicating copy to clipboard operation
shiv copied to clipboard

Error in shipping Django Zipapp

Open chaitanyarahalkar opened this issue 4 years ago • 3 comments

Following the Django zipapp walk through in the documentation here produces NotADirectoryError: [Errno 20] for Django 3.1

chaitanyarahalkar avatar Sep 27 '20 17:09 chaitanyarahalkar

I have the same issue.

Is there any news about this ?

NotADirectoryError: [Errno 20] Not a directory: '/home/abdel/Projects/project/project.pyz/__main__.py'

ayadcodes avatar Dec 06 '20 18:12 ayadcodes

No. The issue still persists!

chaitanyarahalkar avatar Dec 09 '20 05:12 chaitanyarahalkar

I cannot reproduce the problem. The Django zipapp worked fine for me.

I started with a blank venv, activated the venv, installed Django, did django-admin startproject foo, and then followed the docs.

The build.sh file didn't work out of the box on macOS since cp -t is not POSIX compatible (most likely a GNU-ism). But after fixing that, everything worked.

The Django zipapp docs page is quite sparse, incompatible with macOS, leaves out some bits, and assumes that you understand what you're doing... Indeed, it's not quite a walk-through; more of a strategy for how to do it. But that's not a problem with shiv itself.

harkabeeparolus avatar May 09 '21 08:05 harkabeeparolus