[Catalog-sig] Re: PEP 314: Updating the package metadata format

Thomas Heller theller@python.net
23 Apr 2003 19:57:39 +0200


"A.M. Kuchling" <amk@amk.ca> writes:
(see my embedded comments)

> +    Requires (multiple use)
> +      
> +      Each entry contains a string describing some other component or
> +      module required by this package. 
> +
> +      The format of a requirement string is simple: an arbitrary
> +      sequence of characters, optionally followed by a version
> +      declaration within parentheses.  Leading and trailing whitespace
> +      are ignored, and whitespace within the string is normalized to a
> +      single space.
> +
> +      A version declaration is a series of conditional operators and
> +      version numbers, separated by commas.  Conditional operators
> +      must be one of "<", ">", "<=", ">=", "=", and "!=".  Version
> +      numbers must be in the format accepted by the
> +      distutils.version.StrictVersion class: two or three
> +      dot-separated numeric components, with an optional "pre-release"
> +      tag on the end consisting of the letter 'a' or 'b' followed by a
> +      number.  Example version numbers are "1.0", "2.3a2", "1.3.99", 
> +
> +      XXX Do we really need = and !=?

Why not?

> +
> +      XXX Should it be == or =?
> +

I would prefer ==.

> +      XXX Should we support LooseVersion instead of StrictVersion?
> +      LooseVersions aren't comparable...

No support for LooseVersion, IMO.

> +    Conflicts (multiple use)
> +
> +      Each entry contains a string describing a component or module
> +      that conflicts with this package, meaning that the two packages
> +      should not be installed at the same time.  Version declarations
> +      cannot be supplied.  
> +
> +      Conflict resolution probably isn't very important for Python
> +      programs, because few extensions will cause problems for other
> +      extensions, unless they're using the same package name.  This 
> +      field name is being defined here for future use.
> +
> +          Conflicts: Gorgon
> +

I have a use case for Conflicts with version numbers.
ctypes was a couple of modules up to version 0.4.x, and is a package
starting with 0.6.x.

If you have both versions installed, you end up with 'ctypes.py' and
'ctypes\__init__.py' in lib/site-packages. If you 'import ctypes', I'm
not sure if you get the package or the module (there are probably rules
in Python to resolve this, but it may be wrong anyway).

Or should this case be handled differently?

Thomas