Python Package Manager (PPM)
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.
Installation
From PyPI
pip install --user nppm (or sudo pip install nppm if you prefer global installs)
From Source
- Clone the repository
- Run
python setup.py --user installand make sure that~/.local/binis on your path. ppmis now installed!
Commands
ppm initInitializes a basic
package.jsonin the current directory.ppm install [--save] [<package(s)>]Installs one or more packages. If
--saveis 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_modulesfolder.ppm start [args],ppm run [args]Run the python script specified as
mainin thepackage.json, supplying itargsas arguments.ppm python [args],ppm repl [args]Start an instance of IPython in the current directory which has the project’s
python_modulesfolder insys.path. Arguments are passed verbatim to IPython.
Immediate To-Do List
- Way to specify ‘binaries’ Need to look at how npm does this.
ppm install -gNot a huge fan of global installs, but they are useful for packages which provide binaries.- Pre-install scripts
License
This software is licensed under GPLv3. Copyright 2014 J David Smith <emallson@atlanis.net>