The goal of this project is very simple: given that I have a copy of a python
project in a folder, I should be able to cd $FOLDER && ppm install && ppm
run
and it should just work.
The way that node with npm works is nice in its simplicity: a package
declaration file (package.json
) and a module directory (node_modules
). It
doesn’t care about multiple copies of the same package (each in a different
node_modules
folder), because not caring makes dependency management much
easier.
I have modeled ppm after npm. The current implementation is built on top of
pip
, because that is the only effective way of having it work right
now. However, usage is very similar to npm.
pip install --user nppm
(or sudo pip install nppm
if you prefer global installs)
- Clone the repository
- Run
python setup.py --user install
and make sure that~/.local/bin
is on your path. ppm
is now installed!
ppm init
Initializes a basic
package.json
in the current directory.ppm install [--save] [<package(s)>]
Installs one or more packages. If
--save
is specified, save the list of packages installed topackage.json
. If no packages are given, install the packages listed inpackage.json
. Packages are installed in the project’spython_modules
folder.ppm start [args]
,ppm run [args]
Run the python script specified as
main
in thepackage.json
, supplying itargs
as arguments.ppm python [args]
,ppm repl [args]
Start an instance of IPython in the current directory which has the project’s
python_modules
folder insys.path
. Arguments are passed verbatim to IPython.
- Way to specify ‘binaries’ Need to look at how npm does this.
ppm install -g
Not a huge fan of global installs, but they are useful for packages which provide binaries.- Pre-install scripts
This software is licensed under GPLv3. Copyright 2014 J David Smith <emallson@atlanis.net>