[Distutils] Python package distribution standards

David Lyon david.lyon at preisshare.net
Tue Jul 7 16:54:45 CEST 2009


On Tue, 07 Jul 2009 23:21:05 +1000, Ben Finney

> If you feel you have constructive input on how Python's package
> distribution metadata can be improved for the needs of OS packagers
> (along with other needs being targeted by such metadata), please read
> the standards drafts, join this discussion, and weigh in now while the
> topic is hot.

The metadata is there for the reading.....

What I've found so far is that it can exist in many places but eventually
it can be found, loaded and displayed (in a package manager gui)

(thanks python globs... + two nights of coding and done)

Like why after so many years of setuptools we can't read metadata
I'll never know - but that's not my problem....

Basically, you're suggesting that all effort should go into the *nix
side of packaging, supporting OS style packaging....

But what if people aren't using *nix.... and are using Windows?

Let me describe it more succinctly.... in *nix terms...

You're placing a bias on package installation within:

 - /usr/lib/pythonX.X/site-packages

That's very deep in a *nix operating system.. H*ll that is the
operating system.....

You want the packages to easily be built for say ubuntu.. and 
sent to packages.ubuntu.com or wherever...

But in *nix, there's another place being completely ignored...

The python back-yard...

That is:

 - /usr/local/lib/pythonX.X/site-packages

Point?

this directory is *our workbench*, not /usr/lib....

If everybody gets drawn off to work on OS packaging nobody
gets left to work on local packaging stuff. And all the
packages keep on being stale.. and blah blah blah

Looking at PEP-376... who needs the metadata?

A Package Manager? maybe.. but if there's been no api
it can go find everything it needs.... it's hanging
around somewhere... takes 0.1 seconds to find..

Then there is setup.py and the metadata.....

It's crazy generating the metadata from the setup.py....

It is far more logical to generate the setup.py from the
metadata...... if you think about it...

And then.....

We're led to ask the question.. why have a setup.py at all...?

(What really does it accomplish apart from cause headaches)

Just use the api and the metadata to install your packages...

A side benefit, every time there is a build.. the version/build
numbers get auto-incremented in the metadata... Things start
to make more sense..

On topic.. which has run out of time now... is PYPI....

My suggestions on improving the metadata are really simple..

 - Specify either Package or App

 - specify documentation

 - specify program shortcuts (in the desktop x-plat for win+mac+lin)

 - kill setup.py (except for exceptional circumstances)

 - build for more python versions

 - build for more operating systems

 - assist developers with -1 and -2

David















More information about the Distutils-SIG mailing list