this is a german Web-Mirror of PYTHON.ORG powered by Domainunion AG

Differences between revisions 4 and 48 (spanning 44 versions)
Revision 4 as of 2006-05-05 04:53:00
Size: 2032
Editor: RichardJones
Comment: add in some TODO items
Revision 48 as of 2008-11-15 14:00:52
Size: 5201
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
This page documents the development of the Python Cheese Shop: This page documents the development of the Python Package Index (formerly known as Cheeseshop):
Line 3: Line 3:
  https://cheeseshop.python.org  . https://pypi.python.domainunion.de
= How to submit packages =
This page isn't about submitting packages. You want to see CheeseShopTutorial instead.
Line 5: Line 7:
The PyPI (packages index, Cheese Shop web interface) code resides in SVN at: = Requests for new Trove categories =
Python frameworks with plugins or packages that target the framework can get their own category. The category should only be added *after* such packages exist. Complimentary packages can link to each other from their descriptions, they do not need a category to link them together; only when packages are provided by different people does a category need to be created. To ask for a category email catalog-sig@python.org .
Line 7: Line 10:
  https://svn.python.org/packages/ (trunk,features,branches) = XML-RPC Interface =
The Package Index has an XML-RPC interface which may be used by any 3rd-party application developer. See CheeseShopXmlRpc for details.
Line 9: Line 13:
Requests for new Trove categories: = Developing the Package Index =
This information is for developers working on the PyPI code. The PyPI code resides in SVN at:
Line 11: Line 16:
  Python frameworks with plugins or packages that target the framework
  can get their own category. The category should only be added *after*
  such packages exist. Complimentary packages can link to each other
  from their descriptions, they do not need a category to link them
  together; only when packages are provided by different people does a
  category need to be created. To ask for a category email
  catalog-sig@python.org.
 . https://svn.python.org/packages/ (trunk,features,branches)
Developers with access may use this URL:
Line 19: Line 19:
 . svn+ssh://svn.python.org/data/repos/packages/trunk/pypi
Line 21: Line 22:
  https://sourceforge.net/tracker/?group_id=66150&atid=513503  . https://sourceforge.net/tracker/?group_id=66150&atid=513503
Discussion about the Package Index should be had on the Catalog SIG mailing list:
Line 23: Line 25:
Discussion about the Cheese Shop should be had on the Catalog SIG mailing list:  . https://mail.python.org/mailman/listinfo/catalog-sig
Package Index API used by easy_install:
Line 25: Line 28:
  https://mail.python.org/mailman/listinfo/catalog-sig

 . https://peak.telecommunity.com/DevCenter/EasyInstall#package-index-api
Line 29: Line 30:

* [https://python.domainunion.de/peps/pep-0345.html PEP for metadata 1.2] -- not finished and needs more catalog-sig discussion)
 * edit [https://python.domainunion.de/peps/pep-0243.html PEP 243] to reflect reality
 * auto-generate download_urls for package uploads
 * [[https://python.domainunion.de/peps/pep-0345.html|PEP for metadata 1.2]] -- not finished and needs more catalog-sig discussion)
Line 34: Line 32:
 * DOAP support
Line 36: Line 33:
 * better searching (eg. single search box on the front page)
Line 39: Line 35:
 * auto-compute [https://cheesecake.org Cheesecake] scores
 * moderated user reviews and ratings
 * moderated user reviews and ratings (this would require quite a lot of support from volunteers though)
 * per-classifier "wiki" content to allow description and discussion around each classifier (perhaps what packages are available and how they relate to one another)
 * screenshot images (with thumbnailing and a "latest screenshot" on the front page?) - or perhaps icons instead of thumbnails for some packages?
Something that's been requested, but needs much more thought and analysis to see whether it causes any problems: the ability to treat project names and versions as case-insensitive, while removing extraneous characters (as in pkg_resources.safe_name()) for purposes both of searching and determining name uniqueness when registering.
Line 42: Line 40:
Something that's been requested, but needs much more thought and analysis to see whether it causes any problems: the ability to treat project names and versions as case-insensitive, while removing extraneous characters (as in pkg_resources.safe_name()) for
purposes both of searching and determining name uniqueness when registering.
== Not Going TO-DO ==
 * Edit [[https://python.domainunion.de/peps/pep-0243.html|PEP 243]] to reflect reality. The interface is implemented in the distutils register and upload commands. This code is good enough for documentation, especially because it's the only implementation necessary.
== Proposals ==
 * [[https://wiki.python.domainunion.de/moin/EnhancedPyPI|EnhancedPyPI]] Enhance multiple package index servers support in Distutils.
== Development Environment Hints ==
PyPI uses postgresql as a database, with a roll it yourself web framework based on different python modules. It uses apache2 as the web server.

It can run using cgi, fcgi and mod_python.

Before restoring database, "pypi" role must exists:

{{{
  createuser pypi
}}}
These are notes so we can remember how to dump / restore the packages database:

{{{
  pg_dump -Fc -b packages >packages-20060706.dump
  createdb packages
  pg_restore -O -d packages -Fc packages-20060706.dump
}}}
Ask RichardJones if you need a database dump.

PageTemplates are obtained from:

{{{
  svn co svn://svn.zope.org/repos/main/zope.pagetemplate/trunk zope.pagetemplate
  svn co svn://svn.zope.org/repos/main/zope.tal/trunk zope.tal
  svn co svn://svn.zope.org/repos/main/zope.interface/trunk zope.interface
  svn co svn://svn.zope.org/repos/main/zope.i18nmessageid/trunk zope.i18nmessageid
  svn co svn://svn.zope.org/repos/main/zope.tales/trunk zope.tales
}}}
We also need to install ez_setup, celementtree and docutils.

# For debian, this should get you most of the dependencies. apt-get install zope3 python-celementtree python-psycopg

Then go ahead and edit pypi.ini and this line in pypi.cgi:

{{{
  cfg = config.Config('/tmp/pypi.ini', 'webui')
}}}
if your config.ini isn't in /tmp/pypi.ini. You can leave it as 'config.ini' if it's in the same directory as pypi.py.

You will need to add cheesecake_password=yourpasshere into the config.ini in the webui section.

If you wish to test functionality that requires login, then you will need to configure your apache to pass through basic auth. You do this by adding lines '''similar''' to the following to your apache2 conf file:

{{{
  RewriteCond %{HTTP:Authorization} ^(.+)$
  RewriteRule ^/cgi-bin/pypi.cgi(.*) /Library/WebServer/CGI-Executables/pypi.cgi$1 [e=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l]
}}}
If this doesn't work, then you can use these lines to debug:

{{{
  RewriteLog /var/log/httpd/rewrite.log
  RewriteLogLevel 9
}}}

This page documents the development of the Python Package Index (formerly known as Cheeseshop):

How to submit packages

This page isn't about submitting packages. You want to see CheeseShopTutorial instead.

Requests for new Trove categories

Python frameworks with plugins or packages that target the framework can get their own category. The category should only be added *after* such packages exist. Complimentary packages can link to each other from their descriptions, they do not need a category to link them together; only when packages are provided by different people does a category need to be created. To ask for a category email catalog-sig@python.org .

XML-RPC Interface

The Package Index has an XML-RPC interface which may be used by any 3rd-party application developer. See CheeseShopXmlRpc for details.

Developing the Package Index

This information is for developers working on the PyPI code. The PyPI code resides in SVN at:

Developers with access may use this URL:

Patches and bug reports should be submitted to:

Discussion about the Package Index should be had on the Catalog SIG mailing list:

Package Index API used by easy_install:

TO-DO list

  • PEP for metadata 1.2 -- not finished and needs more catalog-sig discussion)

  • command-line tool to query pypi and fetch entries
  • documented procedures for "taking over" entries should the original owner of the entry go away (and any required system support)
  • tooltips for field labels
  • change notification emails
  • moderated user reviews and ratings (this would require quite a lot of support from volunteers though)
  • per-classifier "wiki" content to allow description and discussion around each classifier (perhaps what packages are available and how they relate to one another)
  • screenshot images (with thumbnailing and a "latest screenshot" on the front page?) - or perhaps icons instead of thumbnails for some packages?

Something that's been requested, but needs much more thought and analysis to see whether it causes any problems: the ability to treat project names and versions as case-insensitive, while removing extraneous characters (as in pkg_resources.safe_name()) for purposes both of searching and determining name uniqueness when registering.

Not Going TO-DO

  • Edit PEP 243 to reflect reality. The interface is implemented in the distutils register and upload commands. This code is good enough for documentation, especially because it's the only implementation necessary.

Proposals

  • EnhancedPyPI Enhance multiple package index servers support in Distutils.

Development Environment Hints

PyPI uses postgresql as a database, with a roll it yourself web framework based on different python modules. It uses apache2 as the web server.

It can run using cgi, fcgi and mod_python.

Before restoring database, "pypi" role must exists:

  createuser pypi

These are notes so we can remember how to dump / restore the packages database:

  pg_dump -Fc -b packages >packages-20060706.dump
  createdb packages
  pg_restore -O -d packages -Fc packages-20060706.dump

Ask RichardJones if you need a database dump.

PageTemplates are obtained from:

  svn co svn://svn.zope.org/repos/main/zope.pagetemplate/trunk zope.pagetemplate
  svn co svn://svn.zope.org/repos/main/zope.tal/trunk zope.tal
  svn co svn://svn.zope.org/repos/main/zope.interface/trunk zope.interface
  svn co svn://svn.zope.org/repos/main/zope.i18nmessageid/trunk zope.i18nmessageid
  svn co svn://svn.zope.org/repos/main/zope.tales/trunk zope.tales

We also need to install ez_setup, celementtree and docutils.

# For debian, this should get you most of the dependencies. apt-get install zope3 python-celementtree python-psycopg

Then go ahead and edit pypi.ini and this line in pypi.cgi:

  cfg = config.Config('/tmp/pypi.ini', 'webui')

if your config.ini isn't in /tmp/pypi.ini. You can leave it as 'config.ini' if it's in the same directory as pypi.py.

You will need to add cheesecake_password=yourpasshere into the config.ini in the webui section.

If you wish to test functionality that requires login, then you will need to configure your apache to pass through basic auth. You do this by adding lines similar to the following to your apache2 conf file:

  RewriteCond %{HTTP:Authorization}  ^(.+)$
  RewriteRule ^/cgi-bin/pypi.cgi(.*) /Library/WebServer/CGI-Executables/pypi.cgi$1 [e=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l]

If this doesn't work, then you can use these lines to debug:

  RewriteLog /var/log/httpd/rewrite.log
  RewriteLogLevel 9

CheeseShopDev (last edited 2019-08-23 10:57:11 by SumanaHarihareswara)

Unable to edit the page? See the FrontPage for instructions.