Here is PEP 243, discussing how to make Distutils submit .tar.gz
packages (and the like) to the mythical catalog server. I've got code for
this prototyped, but give me a couple of days to make it completely
PEP-compliant.
Moshe has already commented:
a. you don't say which URL to post to (just spell it out:
POST http://modules.python.org:80/ (and let upload override that)
b. have the codes be HTTP codes and the headers HTTP non-standard
(X-) headers. how about using the HTTP headers and error-codes, and
have *all* the page human readable.
Good comments, I'll look at building them in...
I look forward to any comments -- I'd like to start working on distutils
patches within the week.
Thanks,
Sean
==========================================================================
PEP: 243
Title: Module Repository Upload Mechanism
Version: $Revision$
Author: jafo-pep@tummy.com (Sean Reifschneider)
Status: Draft
Type: Standards Track
Created: 18-Mar-2001
Python-Version: 2.1
Post-History:
Discussions-To: distutils-sig@python.org
Abstract
For a module repository system (such as Perl's CPAN) to be
successful, it must be as easy as possible for module authors to
submit their work. An obvious place for this submit to happen is
in the Distutils tools after the distribution archive has been
successfully created. For example, after a module author has
tested their software (verifying the results of "setup.py sdist"),
they might type "setup.py sdist --submit". This would flag
Distutils to submit the source distribution to the archive server
for inclusion and distribution to the mirrors.
This PEP only deals with the mechanism for submitting the software
distributions to the archive, and does not deal with the actual
archive/catalog server.
Upload Process
The upload will include the Distutils "PKG-INFO" meta-data
information (as specified in PEP-241 [1]), the actual software
distribution, and other optional information. This information
will be uploaded as a multi-part form encoded the same as a
regular HTML file upload request. This form is posted using
ENCTYPE="multipart/form-data" encoding.
The upload will be made to the host "modules.python.org" on port
80/tcp. The form will consist of the following fields:
distribution -- The file containing the module software (for
example, a .tar.gz or .zip file).
distmd5sum -- The MD5 hash of the uploaded distribution,
encoded in ASCII representing the hexadecimal representation
of the digest ("for byte in digest: s = s + ('%02x' %
ord(byte))").
pkginfo -- The file containing the distribution meta-data (as
specified in PEP-241 [1]).
infomd5sum -- The MD5 hash of the uploaded meta-data, encoded
in ASCII representing the hexadecimal representation of the
digest ("for byte in digest: s = s + ('%02x' % ord(byte))").
platform (optional) -- A string representing the target
platform for this distribution. This is only for binary
distributions. It is encoded as
"
participants (1)
-
Sean Reifschneider