Skip to content

Commit 78016d6

Browse files
committed
Added instructions for s3-hosted PyPi repo
Adapted from an awesome article by @jsutlovic
1 parent be9ffbb commit 78016d6

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

docs/shipping/packaging.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,36 @@ Chishop
6767
written in django which allows you to register/upload with distutils and
6868
install with easy_install/pip.
6969

70+
S3-Hosted PyPi
71+
++++++++++++++
72+
73+
One simple option for a personal PyPi server is to use Amazon S3. A prerequisite for this is that you have an Amazon AWS account with an S3 bucket.
74+
75+
1. **Install all your requirements from PyPi or another source**
76+
2. **Install pip2pi**
77+
78+
* :code:`pip install git+https://github.com/wolever/pip2pi.git`
79+
80+
3. **Follow pip2pi README for pip2tgz and dir2pi commands**
81+
82+
* :code:`pip2tgz packages/ YourPackage` (or :code:`pip2tgz packages/ -r requirements.txt`)
83+
* :code:`dir2pi packages/`
84+
85+
4. **Upload the new files**
86+
87+
* Use a client like Cyberduck to sync the entire :code:`packages` folder to your s3 bucket
88+
* Make sure you upload :code:`packages/simple/index.html` as well as all new files and directories
89+
90+
5. **Fix new file permissions**
91+
92+
* By default, when you upload new files to the S3 bucket, they will have the wrong permissions set.
93+
* Use the Amazon web console to set the READ permission of the files to EVERYONE.
94+
* If you get HTTP 403 when trying to install a package, make sure you've set the permissions correctly.
95+
96+
6. **All done**
97+
98+
* You can now your package with :code:`pip install --index-url=http://your-s3-bucket/packages/simple/ YourPackage`
99+
70100
For Linux Distributions
71101
::::::::::::::::::::::::
72102

0 commit comments

Comments
 (0)