[Python-Dev] Status of packaging in 3.3

Alex Clark aclark at aclark.net
Fri Jun 22 01:34:37 CEST 2012


Hi,
On 6/21/12 5:38 PM, Donald Stufft wrote:
> On Thursday, June 21, 2012 at 4:01 PM, Paul Moore wrote:
>> End users should not need packaging tools on their machines.
>>> Sort of riffing on this idea, I cannot seem to find a specification for
> what a Python
> package actually is.

FWIW according to distutils[1], a package is: a module or modules inside 
another module[2]. So e.g.::
 foo.py is a module
and:
 foo/__init__.py
 foo/foo.py
is a simple package containing the following modules:
 import foo, foo.foo
Alex
[1] 
http://docs.python.org/distutils/introduction.html#general-python-terminology
[2] And a distribution is a compressed archive of a package, in case 
that's not clear.
> Maybe the first effort should focus on this instead
> of arguing one
> implementation or another.
>> As a packager:
> I should not (in general) care what tool (pip, pysetup,
> easy_install, buildout, whatever) is used
> to install my package, My package should just describe what to do
> to install itself.
>> As a end user:
> I should not (in general) care what tool was used to create a
> package (setuptools, bento, distutils,
> whatever). My tool of choice should look at the package and preform
> the operations that the package
> says are needed for install.
>> Ideally the package could have some basic primitives that are enough to
> tell the package installer
> tool what to do to install it, These primitives should be enough to
> cover the common cases (pure python
> modules at the very least, maybe additionally some C modules). Now as
> others have remarked it would
> be insane to attempt to do this in every case as it would involve
> writing a build system that is more
> advanced than anything else existing, so a required primitive would be
> something that allows calling out
> to a specific package decided build system (waf, make, whatever) to
> handle the build configuration.
>> The eventual end goal here being to make a package from something that
> varies from implementation
> to implementation to a standardized format that any number of tools can
> build on top of. It would likely
> include some things defining where metadata MUST be defined.
>> For instance, if metadata in setuptools was "compiled" down to static
> file, and easy_install, pip et;al
> used that static file to install from instead of executing setup.py,
> then the end user would not have
> required setup tools installed and instead any number of tools could
> have been created that utilized
> that data.
>>
-- 
Alex Clark · http://pythonpackages.com


More information about the Python-Dev mailing list

AltStyle によって変換されたページ (->オリジナル) /