Adding a dependency: Difference between revisions

From OpenHatch wiki
Content added Content deleted
imported>Paulproteus
No edit summary
imported>Ewupijug
No edit summary
Line 1: Line 1:
{{Hacking OpenHatch}}
{{Hacking OpenHatch}}
== Using buildout: adding a dependency ==
>== 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).
# 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''.
# Edit ''milestone-a/setup.py''.
# Add the dependency's Python package name to "install_requires". You may optionally include a version number.
# 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:
# 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
## cd to the package's top-level directory, where setup.py is
Line 10: Line 10:
## This creates a tarball of your Python package in dist/.
## 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.)
# 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 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".
# Add the package name to milestone-a/buildout.cfg under "eggs".
# Run bin/buildout
# Run bin/buildout

----
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
----
=[http://ypivotuhuno.co.cc Under Construction! Please Visit Reserve Page. Page Will Be Available Shortly]=
----
=[http://ypivotuhuno.co.cc CLICK HERE]=
----
</div>

Revision as of 22:16, 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 ==

  1. 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).
  2. Edit milestone-a/setup.py.
  3. Add the dependency's Python package name to "install_requires". You may optionally include a version number.
  4. If you haven't already, create a tarball of the Python package as follows:
    1. cd to the package's top-level directory, where setup.py is
    2. Run `python setup.py sdist`
    3. This creates a tarball of your Python package in dist/.
  5. 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.)
  6. 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.
  7. Add the package name to milestone-a/buildout.cfg under "eggs".
  8. Run bin/buildout