[Distutils] Creating distribution for Python *module*, not package

Paul Sokolovsky pmiscml at gmail.com
Tue Apr 1 21:46:54 CEST 2014


Hello,

On Tue, 1 Apr 2014 22:25:09 +0300
Paul Sokolovsky <pmiscml at gmail.com> wrote:

> Hello,
> 
> I would like to create a PyPIable packaged disribution for a
> single-file python module (say, foo.py). How to achieve that? There
> doesn't seem to be "modules" param to setup() (as a mirror of
> "packages" param).

Ah, pure magic: google it, search stackoverflow - find nothing. Post a
question to mailing list, and next step find the answer - the param is
called "py_modules".

Let's analyze: I would expect a complete reference of setup() params on
https://pythonhosted.org/setuptools/ , and/or explicit and very visible
mentioning that setuptools is extension to distutils and its docs
should be read first.

Instead I get:

Confusing TOC, first entry is called "Roadmap", which doesn't
provide any roadmap, but instead status. Next one "Supporting both
Python 2 and Python 3 with Setuptools" - oh, sure that's first thing I
want to know about setuptools. Or maybe no, first thing I want to know
what the heck it is. So, the section with which manual should start,
"Building and Distributing Packages with Setuptools" is #4 in TOC, no
wonder it takes a while for people to get to it. Searching for
"py_modules" returns 0 hits.

And kind suggestion for packaging tutorials writers - please start from
the start, by describing how to package a *module*, there's no need to
force package bloat on everyone. And the latter is exactly what 3
google-top tutorials I read did.


Keep up the great work!

-- 
Best regards,
 Paul                          mailto:pmiscml at gmail.com


More information about the Distutils-SIG mailing list