Skip to content

pydotorg/pypi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Richard Jones
Apr 23, 2015
e2f4a55 · Apr 23, 2015
Dec 10, 2013
Feb 15, 2015
Apr 23, 2015
Dec 10, 2013
Jul 2, 2014
Dec 10, 2013
Apr 13, 2015
Dec 10, 2013
Dec 10, 2013
Nov 28, 2013
Dec 10, 2013
Jun 26, 2014
Dec 10, 2013
Dec 10, 2013
Feb 23, 2015
Dec 10, 2013
Jul 28, 2014
Jul 28, 2014
Mar 8, 2015
Dec 10, 2013
Feb 9, 2014
Dec 10, 2013
Jan 24, 2015
Dec 10, 2013
Dec 10, 2013
Dec 10, 2013
Dec 10, 2013
Dec 10, 2013
Dec 10, 2013
Dec 10, 2013
Jan 24, 2015
Jul 2, 2014
Nov 17, 2013
Jan 2, 2010
Nov 17, 2013
Mar 18, 2015
Dec 10, 2013
Dec 10, 2013
Mar 17, 2015
Jan 24, 2015
Dec 10, 2013
Dec 10, 2013
Nov 17, 2013
Nov 17, 2013
Mar 18, 2015
Jul 28, 2014
Dec 10, 2013
Dec 10, 2013
Aug 5, 2014
Dec 10, 2013
Dec 10, 2013
Mar 19, 2015

Repository files navigation

Required packages
-----------------

To run the PyPI software, you need Python 2.5+ and PostgreSQL


Quick development setup
-----------------------

Make sure you read http://wiki.python.org/moin/CheeseShopDev#DevelopmentEnvironmentHints
and you have a working PostgreSQL DB.

Make sure your config.ini is up-to-date, initially copying from
config.ini.template. Change CONFIG_FILE at the begining of pypi.wsgi,
so it looks like this::

    CONFIG_FILE = 'config.ini'

Then, you can create a development environment like this, if you have
virtualenv installed::

    $ virtualenv --no-site-packages .
    $ pip install -r requirements.txt

Then you can launch the server using the pypi.wsgi script::

    $ python pypi.wsgi
    Serving on port 8000...

PyPI will be available in your browser at http://localhost:8000

Database Setup
--------------

To fill a database, run pkgbase_schema.sql on an empty Postgres database.
Then run tools/demodata to populate the database with dummy data.

For testing purposes, run tools/mksqlite to create packages.db. Set
[database]driver to sqlite3, and [database]name to packages.db, then
run tools/demodata to populate the database.

PyPI Requires the citext extension to be installed.

TestPyPI Database Setup
-----------------------

testpypi runs under postgres; because I don't care to fill my head with such
trivialities, the setup commands are:

   createdb -O testpypi testpypi
   psql -U testpypi testpypi <pkgbase_schema.sql


Restarting PyPI
---------------

PyPI has 2 different pieces that need started, web server and the task runner.

    # Restart the web server
    $ /etc/init.d/pypi restart
    # Restart the task runner
    $ initctl restart pypi-worker

Clearing a stuck cache
----------------------

Users reporting stale data being displayed? Try:

  curl -X PURGE https://pypi.python.org/pypi/setuptools

(where the URL is the relevant one to the issue, I presume)

To see what fastly thinks it knows about a page (or how it's getting to you) try:

  curl -I -H 'Fastly-Debug: 1'  https://pypi.python.org/pypi/setuptools