Setuptools Confusion

Ben Finney ben+python at benfinney.id.au
Mon Mar 30 15:03:01 EDT 2015


Rob Gaddi <rgaddi at technologyhighland.invalid> writes:

> I'm having two issues trying to make setuptools do what I want to package 
> up an application.

Those questions are on-topic here. It's worth noting, though, that you
may get better discussion of this by asking in the Distutils forum
<URL:https://www.python.org/community/sigs/current/distutils-sig/>.

> I feel like both my questions come down to the same root; how do I hook 
> setuptools to do additional tasks at appropriate times?

In short, you need to extend the ‘distutils.command’ classes and specify
your custom classes as commands. The Distutils documentation describes
this <URL:https://docs.python.org/3/distutils/extending.html>.

Note, though, that this is an advanced topic and not to be undertaken
lightly; it isn't very well understood.

> Is it really as complicated as all this, or is there something trivial
> and stupid that I'm just missing?

It's more complicated than you thought :-(

The Python Packaging Authority <URL:https://www.pypa.io/> has greatly
improved the situation in recent years, with the Python Packaging User
Guide <URL:https://packaging.python.org/> among other works.

The bad news is that, though better than ten years ago, Python package
distribution is still surprisingly baroque and difficult to navigate.

-- 
 \       “I never forget a face, but in your case I'll be glad to make |
  `\                                      an exception.” —Groucho Marx |
_o__)                                                                  |
Ben Finney




More information about the Python-list mailing list