Skip to content

Commit

Permalink
Split code as a package, compiled into an executable zip
Browse files Browse the repository at this point in the history
  • Loading branch information
FiloSottile committed Mar 25, 2012
1 parent c23d8a7 commit d77c3df
Show file tree
Hide file tree
Showing 8 changed files with 4,333 additions and 4,284 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ update-readme:
echo "$${footer}" >> README.md

compile:
cp youtube_dl/__init__.py youtube-dl
zip --junk-paths youtube-dl youtube_dl/*.py
echo '#!/usr/bin/env python' > youtube-dl
cat youtube-dl.zip >> youtube-dl
rm youtube-dl.zip

.PHONY: default compile update update-latest update-readme
Binary file modified youtube-dl
Binary file not shown.
Loading

6 comments on commit d77c3df

@mirabilos
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excuse me, but, what?!

This breaks my Python, which chokes on the zip binary junk.

@Tailszefox
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which version of Python are you using? This new format works perfectly with Python >=2.6 but is unsupported by other versions. If you have a lower version and can't upgrade, try giving a look at the FAQ which outlines a way to make it work with lower versions.

@FiloSottile
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are using cPython 2.5, well, you have a bigger problem than this. Otherwise, it will work fine. Also, this is the common way to ship Python packages, the zipfile is only a commodity, you can grab the package folder and run that.

@mirabilos
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah okay. Ouch. Looks like I’m going to have to port a newer Python then… the latest of 2.7 would be best I suppose.

@FiloSottile
Copy link
Collaborator Author

@FiloSottile FiloSottile commented on d77c3df Oct 31, 2012 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mirabilos
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, thanks anyway. It used to work well. I wonder how much I have to fix BitTorrent 3.4 to work with Python 2.7 though… bumping it from 2.3 to 2.5 was “fun” already. But that’s not your construction site. Thanks for the heads-up (I thought I had received a garbage file until I found this after some discussion on Debian) and your work on this program.

Please sign in to comment.