blob: c6106de77d906f6604a4ab7a9e5caad816aefd76 [file] [log] [blame]
Éric Araujo3a9f58f2011-06-01 20:42:49 +02001.. _packaging-pysetup-servers:
2
3===============
4Package Servers
5===============
6
7Pysetup supports installing Python packages from *Package Servers* in addition
8to PyPI indexes and mirrors.
9
10Package Servers are simple directory listings of Python distributions. Directories
Éric Araujo5da37be2011-06-01 20:44:40 +020011can be served via HTTP or a local file system. This is useful when you want to
Éric Araujo3a9f58f2011-06-01 20:42:49 +020012dump source distributions in a directory and not worry about the full index structure.
13
14Serving distributions from Apache
15---------------------------------
16::
17
18 $ mkdir -p /var/www/html/python/distributions
19 $ cp *.tar.gz /var/www/html/python/distributions/
20
21 <VirtualHost python.example.org:80>
22 ServerAdmin webmaster@domain.com
23 DocumentRoot "/var/www/html/python"
24 ServerName python.example.org
25 ErrorLog logs/python.example.org-error.log
26 CustomLog logs/python.example.org-access.log common
27 Options Indexes FollowSymLinks MultiViews
28 DirectoryIndex index.html index.htm
29
30 <Directory "/var/www/html/python/distributions">
31 Options Indexes FollowSymLinks MultiViews
32 Order allow,deny
33 Allow from all
34 </Directory>
35 </VirtualHost>
36
37Add the Apache based distribution server to :file:`.pypirc`::
38
39 [packaging]
40 package-servers =
41 apache
42
43 [apache]
44 repository: http://python.example.org/distributions/
45
46
47Serving distributions from a file system
48----------------------------------------
49::
50
51 $ mkdir -p /data/python/distributions
52 $ cp *.tar.gz /data/python/distributions/
53
54Add the directory to :file:`.pypirc`::
55
56 [packaging]
57 package-servers =
58 local
59
60 [local]
61 repository: file:///data/python/distributions/