Adding a dependency: Difference between revisions
Content added Content deleted
imported>Ewupijug No edit summary |
imported>Paulproteus No edit summary |
||
Line 1:
{{Hacking OpenHatch}}
# Find the Python package name of the dependency. This will appear in the package's own ''setup.py'' file (as a parameter called
# Edit ''milestone-a/setup.py''.
# Add the dependency's Python package name to
# If you haven't already, create a tarball of the Python package as follows:
## cd to the package's top-level directory, where setup.py is
Line 10:
## This creates a tarball of your Python package in dist/.
# Host a tarball of the Python package at some public URL. (This is in order to cache a copy of the package somewhere everyone can reliably reach it.)
# Add the tarball URL to the list called
# Add the package name to milestone-a/buildout.cfg under
# Run bin/buildout
|
Revision as of 23:08, 17 November 2010
This is a page about improving or modifying OpenHatch.
We call that "Hacking OpenHatch," and there is a whole category of pages about that.
Using buildout: adding a dependency
- Find the Python package name of the dependency. This will appear in the package's own setup.py file (as a parameter called "name" passed to the setup function).
- Edit milestone-a/setup.py.
- Add the dependency's Python package name to "install_requires". You may optionally include a version number.
- If you haven't already, create a tarball of the Python package as follows:
- cd to the package's top-level directory, where setup.py is
- Run `python setup.py sdist`
- This creates a tarball of your Python package in dist/.
- Host a tarball of the Python package at some public URL. (This is in order to cache a copy of the package somewhere everyone can reliably reach it.)
- Add the tarball URL to the list called "dependency_links" in milestone-a/setup.py, appending the string "#egg=the package name" to the URL.
- Add the package name to milestone-a/buildout.cfg under "eggs".
- Run bin/buildout