Skip to content

Commit e7e106f

Browse files
committed
Adding Personal PyPI section
1 parent b280249 commit e7e106f

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

docs/shipping/packaging.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,35 @@ 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+
30+
Say if you are after installing a package called MyPackage.tar.gz, and assuming this is your directory structure
31+
32+
- archive
33+
- MyPackage
34+
- MyPackage.tar.gz
35+
36+
Go to your command prompt and type:
37+
38+
$ cd archive
39+
$ python -m SimpleHTTPServer 9000
40+
41+
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. Say using Pip, you would do it like:
42+
43+
$ pip install --extra-index-url=http://127.0.0.1:9000/ MyPackage
44+
45+
Remember! having a folder with the same name as the package name is __crucial__ here.
46+
I got fooled by that, one time. But if you feel that creating a folder called
47+
__MyPackage__ and keeping __MyPackage.tar.gz__ inside that, is _reduntant_, you can still
48+
install MyPackage like:
49+
50+
$ pip install http://127.0.0.1:9000/MyPackage.tar.gz
51+
2352

2453
For Linux Distributions
2554
::::::::::::::::::::::::

0 commit comments

Comments
 (0)