Package: package
packagepackage packageThis is thepackagepackage package package for Python. It can be found in
the Python Package Index, here:http://pypi.python.org/pypi/package/.packageis a toolset to help Python package people package their packages.
If you do not personally package Python packages, you can ignore thispackagepackage.InstallationDON’T INSTALL THIS PACKAGE (package)!!!packageisn’t meant to be installed like normal Python packages. It is
meant to be copied and distributed as a part of other Python packages.The best thing to do is to togit cloneit from GitHub, and put it beside
the other packages that you package for Python:git clone git://github.com/ingydotnet/package-py.gitThe second best thing to do is get the latestpackage-#.#.#.tar.gzfromhttp://pypi.python.org/pypi/package/, untar it and rename the directory topackage-py.Then follow the instructions given below.WTF?Confused? So was I…I like to write a lot of modules and distribute them as packages, but
when I started doing this in Python, I ran into a wall of
setup/installer bugs, bad workarounds and community disagreement about
what the best way to go was. I decided to fix this in a way that makes
all programmers be able to install my Python packages (and their
prerequisite packages), regardless of their current Python knowledge or
working environment.The solution is simple. Just add helper tools in a subdirectory that
gets included in every Python package you release.It’s a simple trade of a little extra storage space for functionality,
package-author-sanity and world peace. :)Design GoalsThese are some of the things I was concerned with when I started this project:Make my Python packages installable by anyone.Allow my Python packages to depend on other packages.Put as little extra burden on the user as possible.Never leave the user uninformed and screaming.Make setup.py files be autogenerated from simple yaml files.Don’t let this project paint its users into yet another dependency corner.Provide a simple Makefile for automating related tasks.Provide support for running unittests withmake test.Keep the bloat of usingpackageto a minimum.UsageTo use this Python package packaging technique, follow these simple steps:> cd your/src/dir/In other words, just go to the directory where you want to put thispackagepackage’s repository. Putting it next to your other Python
package source code repositories is what I am suggesting here…> git clonegit://github.com/ingydotnet/package-py.gitUnless, of course, you already havepackage-py. Then maybe you shouldgit pullit to get the latest code.> mkdir newproject> cd newproject> make-f../package-py/Makefile.mksetupThis will set up the all files you need for a new project. These files are
in a generic, template form until you complete the next two steps.Editpackage/info.yamlwith all the information about your package.Commonly, you will only need two lines in this file:name: newproject
include: ../package-py/my-info.yamlYou can keep all your common values in a common file to be included. The
project name, of course, is always different from package to package.> make infoThis command will update your package files with the information you
specified inpackage/info.yaml. You should run it whenever you update
yourinfo.yamlfile.> make helpAt this point everything should be set up for you to use just like any
other setup.py.From here on out, you are encouraged (but not required) to use the
Makefile. Runmake helpto see all the options available to you.> make testpackageprovides a complete working test environment environment for
your package. It even provides one test. This test is a FAILING test! It
tests to see if your new Python module will import cleanly. But it won’t.
It will, in fact, raise an exception telling you that your module has not
yet been implemented.Fix your module, write more tests, finish your module.> make uploadShip your new package to PyPI!Development StatusThispackagepackage package package has been around for year now. Let’s
call it Beta.I am using this software for all my projects on PyPI. I do most of my
development on Ubuntu Linux using Python 2.6.6.I would love to talk to you about your experience in using this software. Feel
free to hunt me down on the net…AuthorThis blasphemous atrocity was brought to you by Ingy dot Net. Yes, the same
guy who ruined Perl. There was nothing there left there for him to pillage, so
he has moved on to your neighborhood. Be afraid.Copyrightpackageis Copyright (c) 2010, 2011, Ingy dot Netpackageis licensed under the New BSD License. See the LICENSE file.