Skip to content

Master

Ryan Fobel requested to merge ryanfobel/dstat-interface:master into master

Hey Mike,

I just finished repackaging your dstat-interface code as a proper python package and pushed it up to the Python Package Index:

https://pypi.python.org/pypi/dstat-interface

As it stands, people should be able to install the package with the command "pip install dstat-interface".

The main changes are:

  1. rename the "dstat-interface" subfolder to "dstat_interface" (Python packages cannot have underscores in their names)
  2. addition of a pavement.py file (which contains package metadata)
  3. addition of a MANIFEST.in file (which specifies which files should be included in the package)
  4. the version.py file (which extracts a version number from git tags)
  5. renaming of the "main.py" file to "main.py". This is a Python convention, which allows you to run the module once it is installed on your python system path with the command "python -m dstat_interface".

If you want to update the version on PyPi, you simply need to commit any changes within git, then run the command "pavement sdist" to generate the new distributable package (which will be copied to the "dist" subdirectory), or you can run "pavement sdist upload" to generate the package and upload it to PyPi. By default, new git commits will increment the micro version number (e.g., the next commit will be version 1.0-post1). If you want to increment the major or minor version number, you simply need to apply a new git tag (e.g., "git tag -a v1.1) prior to running "pavment sdist ..." command.

You may also want to edit the package metadata in "pavement.py" to include your email and a package description. Before you can push things up to PyPi, you will need to register for an account there. Once you've done that, send me the name of your account and I'll transfer ownership of the package to you.

Sound ok? If you have any other questions about how any of this stuff works, let me know.

-Ryan

Merge request reports