package-cache.git
10 years agoserver: Don't use a keyword for the path argument to getsize
W. Trevor King [Thu, 20 Feb 2014 19:14:54 +0000 (11:14 -0800)]
server: Don't use a keyword for the path argument to getsize

Despite being documented as path [1], using a keyword argument raises
a TypeError:

  TypeError: getsize() got an unexpected keyword argument 'path'

[1]: http://docs.python.org/3/library/os.path.html#os.path.getsize

10 years agoserver: Don't use a keyword for the urlstring argument to urlparse
W. Trevor King [Thu, 20 Feb 2014 19:11:24 +0000 (11:11 -0800)]
server: Don't use a keyword for the urlstring argument to urlparse

Despite being documented as urlstring [1], using a keyword argument
raises a TypeError:

  TypeError: urlparse() got an unexpected keyword argument 'urlstring'

[1]: http://docs.python.org/3/library/urllib.parse.html#urllib.parse.urlparse

10 years agoserver: Don't use a keyword for the path argument to makedirs
W. Trevor King [Thu, 20 Feb 2014 19:05:34 +0000 (11:05 -0800)]
server: Don't use a keyword for the path argument to makedirs

Despite being documented as path [1], using a keyword argument raises
a TypeError:

  TypeError: makedirs() got an unexpected keyword argument 'path'

[1]: http://docs.python.org/3/library/os.html#os.makedirs

10 years agoserver: Create the cache directory if it doesn't already exist
W. Trevor King [Thu, 20 Feb 2014 19:02:29 +0000 (11:02 -0800)]
server: Create the cache directory if it doesn't already exist

10 years agomain: Add an argparse-based command line interface
W. Trevor King [Thu, 20 Feb 2014 19:00:16 +0000 (11:00 -0800)]
main: Add an argparse-based command line interface

And a package-cache.py wrapper script to call it.

10 years agoserver: Stub out a WSGI server
W. Trevor King [Thu, 20 Feb 2014 18:50:41 +0000 (10:50 -0800)]
server: Stub out a WSGI server

This still needs source-fetching and Content-Range support, but it
should handle serving from the cache well enough.

10 years agopackage_cache: Create a Python package with a version
W. Trevor King [Thu, 20 Feb 2014 18:50:17 +0000 (10:50 -0800)]
package_cache: Create a Python package with a version

10 years agoCOPYING: Use the GPLv3
W. Trevor King [Thu, 20 Feb 2014 17:21:07 +0000 (09:21 -0800)]
COPYING: Use the GPLv3

Fresh download from http://www.gnu.org/licenses/gpl-3.0.txt.