Adding a dependency: Difference between revisions

m
no edit summary
imported>Paulproteus
(Created page with '== 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"…')
 
imported>Paulhomebus
mNo edit summary
 
(4 intermediate revisions by 3 users not shown)
Line 1:
[[Category:{{Hacking OpenHatch]]}}
== Using buildout: adding a dependency ==
 
Line 9 ⟶ 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.)
# (or just ask paulproteus to host it on the http://linode.openatch.org/~paulproteus server.)
# 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
 
 
[[Category:Hacking OpenHatch]]
== Some things to remember... ==
 
# If you have problems adding a dependency, you may have a local version which is usually under /usr/local/lib/ --
# First make sure you have the dependency name right, unpack the dependency archive (either tar xvf or unzip),
# then look for the file setup.py - in there you'll find the name="some_package" - This is the name you should be adding to setup.py and buildout.cfg.
# Now, make sure you haven't got it locally, use the mysite shell - $ ./bin/mysite shell, then try importing your dependency.
# Remember to jump on #openhatch on freenode if you get stuck.
Anonymous user