Éric Araujo | 3a9f58f | 2011-06-01 20:42:49 +0200 | [diff] [blame] | 1 | .. _packaging-pysetup-servers: |
| 2 | |
| 3 | =============== |
| 4 | Package Servers |
| 5 | =============== |
| 6 | |
| 7 | Pysetup supports installing Python packages from *Package Servers* in addition |
| 8 | to PyPI indexes and mirrors. |
| 9 | |
| 10 | Package Servers are simple directory listings of Python distributions. Directories |
Éric Araujo | 5da37be | 2011-06-01 20:44:40 +0200 | [diff] [blame] | 11 | can be served via HTTP or a local file system. This is useful when you want to |
Éric Araujo | 3a9f58f | 2011-06-01 20:42:49 +0200 | [diff] [blame] | 12 | dump source distributions in a directory and not worry about the full index structure. |
| 13 | |
| 14 | Serving 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 | |
| 37 | Add 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 | |
| 47 | Serving distributions from a file system |
| 48 | ---------------------------------------- |
| 49 | :: |
| 50 | |
| 51 | $ mkdir -p /data/python/distributions |
| 52 | $ cp *.tar.gz /data/python/distributions/ |
| 53 | |
| 54 | Add the directory to :file:`.pypirc`:: |
| 55 | |
| 56 | [packaging] |
| 57 | package-servers = |
| 58 | local |
| 59 | |
| 60 | [local] |
| 61 | repository: file:///data/python/distributions/ |