ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> catalog-sig
catalog-sig
Re: [Catalog-sig] PyPI naming policy changes
by Phillip J. Eby other posts by this author
May 12 2008 8:13AM messages near this date
[Catalog-sig] PyPI naming policy changes | Re: [Catalog-sig] PyPI naming policy changes
At 12:35 PM 5/12/2008 +0200, Martin v. Löwis wrote:

> - package names must differ in their pkg_resource.safe_name(p).lower()
>    values (e.g. you can't have two packages that only differ in case,
>    or in the amount of white space between words).

Hurray!  Thanks for taking care of this.


> - files must start with to_filename(safe_name(pkg_name)), ignoring case.
>    E.g. for the "BerkeleyDB Backend Storage Engine for DURUS"
>    package, valid file names would be
>    BerkeleyDB_Backend_Storage_Engine_for_DURUS-1.0.tar.gz or
>    berkeleydb_backend_storage_engine_for_durus-1.0.tar.gz, but not
>    durus-berkeleydbstorage-20061121.tar.gz.
> 
>    Existing registrations are not affected; no attempt to clean
>    up the data is made.
> 
> Please let me know if you see any problems with that policy.

One possible problem -- the distutils do not generate "safe" 
filenames.  That is, a project named "foo-bar" or "py-baz" will have 
'-' in the source distribution filename generated by the 
distutils.  So, if you are testing 
filename.startswith(to_filename(...)), then distutils-generated 
packages for such projects won't work.

Probably the test you want here is:

    safe_name(filename).startswith(safe_name(project_name))

As this will handle both distutils-generated and setuptools-generated 
distribution files.

(Setuptools already "knows" that distutils-generated files have this 
naming ambiguity, btw, and works around it.)

_______________________________________________
Catalog-SIG mailing list
Catalog-SIG@[...].org
http://mail.python.org/mailman/listinfo/catalog-sig
Thread:
martin
Phillip J. Eby
martin
Phillip J. Eby
martin
renesd
martin

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved