A quick hack of a project to be able to more effectively use python modules. Currently based on pip.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
nppm-test Renamed things to `nppm`. Default binary is still `ppm`, but `nppm` i… Nov 26, 2014
nppm Version bump on PIP. Jan 9, 2015
.gitignore Renamed things to `nppm`. Default binary is still `ppm`, but `nppm` i… Nov 26, 2014
LICENSE Added GPLv3 License Nov 19, 2014
README Renamed things to `nppm`. Default binary is still `ppm`, but `nppm` i… Nov 26, 2014
README.org
package.json Version bump to 0.1.2 cuz imascrub Jan 12, 2015
requirements.txt Version bump on PIP. Jan 9, 2015
setup.cfg Bunch of restructuring to make the project layout play nice with setu… Nov 24, 2014
setup.py Version bump to 0.1.2 cuz imascrub Jan 12, 2015

README.org

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

  1. Clone the repository
  2. Run python setup.py --user install and make sure that ~/.local/bin is on your path.
  3. ppm is now installed!

Commands

  • 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 to package.json. If no packages are given, install the packages listed in package.json. Packages are installed in the project’s python_modules folder.

  • ppm start [args], ppm run [args]

    Run the python script specified as main in the package.json, supplying it args 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 in sys.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 -g Not 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>