Skip to content

Commit a1f0e9b

Browse files
author
Kenneth Reitz
committed
2 parents 97e9bb6 + f0ab6cd commit a1f0e9b

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

docs/shipping/packaging.rst

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,37 @@ x y z
2020
Personal PyPi
2121
-------------
2222

23+
If you want to install packages from a source different from PyPI, (say, if
24+
your packages are *proprietary*), you can do it by hosting a simple http server,
25+
running from the directory which holds those packages which need to be installed.
26+
27+
**Showing an example is always benificial**
28+
29+
Say if you are after installing a package called MyPackage.tar.gz, and assuming this is your directory structure
30+
31+
32+
- archive
33+
- MyPackage
34+
- MyPackage.tar.gz
35+
36+
Go to your command prompt and type:
37+
::
38+
39+
$ cd archive
40+
$ python -m SimpleHTTPServer 9000
41+
42+
This runs a simple http server running on port 9000 and will list down all packages(like **MyPackage**). Now you can install **MyPackage** using any python package installer. Using Pip, you would do it like:
43+
::
44+
45+
$ pip install --extra-index-url=http://127.0.0.1:9000/ MyPackage
46+
47+
Remember! having a folder with the same name as the package name is **crucia** here.
48+
I got fooled by that, one time. But if you feel that creating a folder called
49+
**MyPackag** and keeping **MyPackage.tar.gz** inside that, is *reduntant*, you can still install MyPackage using:
50+
::
51+
52+
$ pip install http://127.0.0.1:9000/MyPackage.tar.gz
53+
2354

2455
For Linux Distributions
2556
::::::::::::::::::::::::

0 commit comments

Comments
 (0)