summaryrefslogtreecommitdiff
path: root/README
blob: 8b4750fb7753e6db555b2322930ba8106d784fc2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Required packages
-----------------

To run the PyPI software, you need Python 2.5+,
PostgreSQL, and all these packages located at PyPI:

- zope.interface
- zope.pagetemplate
- zope.tal
- zope.tales
- zope.i18nmessageid
- psycopg2 (for testing, sqlite3 might be sufficient)
- docutils
- M2Crypto
- distutils2
- python-openid
- raven
- passlib
- py-bcrypt (If using the recommended bcrypt hasher)

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 --distribute .
    $ bin/easy_install zope.interface zope.pagetemplate
    $ bin/easy_install zope.tal zope.tales zope.i18nmessageid psycopg2
    $ bin/easy_install docutils M2Crypto python-openid raven
    $ bin/easy_install passlib py-bcrypt

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

    $ bin/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.