Merge lp:~flacoste/maas/buildout-site-packages into lp:~maas-committers/maas/trunk
Status: | Merged |
---|---|
Approved by: | Francis J. Lacoste |
Approved revision: | no longer in the source branch. |
Merged at revision: | 203 |
Proposed branch: | lp:~flacoste/maas/buildout-site-packages |
Merge into: | lp:~maas-committers/maas/trunk |
Diff against target: |
323 lines (+208/-44) 4 files modified
HACKING.txt (+37/-8) buildout.cfg (+36/-5) setup.py (+37/-4) versions.cfg (+98/-27) |
To merge this branch: | bzr merge lp:~flacoste/maas/buildout-site-packages |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Dave Walker (community) | Approve | ||
Gavin Panella (community) | Approve | ||
Raphaël Badin | Pending | ||
Launchpad code reviewers | Pending | ||
Review via email: mp+94628@code.launchpad.net |
Commit message
Add explicit versioning for the buildout dependencies. Integrate buildout-versions to manage versions.cfg. Load runtime dependencies from site packages.
Description of the change
This branch adds explicit versioning the the MaaS dependencies.
It adds buildout-versions which makes it easy to manage the versions.cfg
file.
All runtime dependencies are loaded from site packages (well, if they are
available, apart Django, there is not much harm done if you didn't install
the package, as it will still pull it from PyPI).
I turned off allow-picked-
new dependencies are introduced without adding the correct entry to
versions.cfg This should make us more mindful of introducing dep and make us
pause to see if this is a runtime dep (should be packaged and loaded from
site-packages) or a dev-only dep.
I also updated setup.py with the dependencies.
Looks good. Lots of comments, mostly trivial. However, setup.py is
broken, so Needs Fixing.
[1]
+You will need to manually install Postgres 9.1 (postgresql-9.1),
+, RabbitMQ (rabbitmq-server), python-dev and make::
s/^, //
[2]
+Additionally, you probably want to install the following python libraries
+for development convenience::
s/probably want/need/, at least for python-lxml.
[3]
+possible. You'll need to add the dependency to the eggs-from- site-packages` ` option in the ``buildout.cfg`` file. (And picked- version` ` set to false.)
+``allowed-
+don't forget to add the version to ``versions.cfg`` as we run with
+``allowed-
Might be worth mentioning that it also needs to be added to setup.py.
It would be nice if we could auto-generate versions.cfg from setup.py,
or vice-versa. Actually, doesn't buildout use dependency information
from setup.py?
[4]
+If it is a development-only depency (i.e. only needed for the test suite, or
s/depency/ dependency/
[5]
+buildout_ versions_ file = versions.cfg
Grr, everything else uses hyphens. /me emails buildout-versions
author.
[6]
+download-cache = download-cache
/^download-cache/d
We've chosen to *not* define this in <branch> /buildout. cfg; we're default. cfg to use a shared cache. This is much
using ~/.buildout/
easier than following the Launchpad model while MaaS's deps are small
enough.
[7]
+allowed- eggs-from- site-packages =
+ Django
+ South
...
I know it's trivial, but the rest of the file uses 2 spaces for
indentation :)
[8]
+ # Convenient developer dependencies
+ Jinja2
+ Pygments
Are these dependencies of Sphinx? They're not direct dependencies I
think, so can they be left out here?
[9]
+ install_requires=[
+ 'setuptools',
+ 'Django' = 1.3.1,
This doesn't work. This does:
'Django == 1.3.1',
[10]
+ extra_requires= dict(
s/extra_ requires/ extras_ require/
Also, there's a missing brace at the end of setup.py.
[11]
+# Automatic versions in Precise
Is this something that buildout-versions provides?
[12]
We could structure versions.cfg like so:
[versions]
<= versions-run
versions-dev
versions-doc
versions-auto
[versions-run]
Django = ...
[versions-dev]
lxml = ...
[version-doc]
Sphinx = ...
[versions-auto]
buildout-versions = ...
Then we could pull these out in setup.py:
versions = ConfigParser. ConfigParser( ) read("versions. cfg")
versions.
def gen_deps(section): options( section) : get(section, option)
for option in versions.
value = versions.
if options[-1] in "<!>":
yield b"%s=%s" % (option, value)
else:
yield b"%s==%s" % (option, value)
deps = lambda section: list(gen_ deps(section) )
... requires= (
deps( "versions- run") +
deps( "versions- auto")) , require= { doc"), run"),
install_
...
extras_
b'doc': deps("versions-
b'tests': deps("versions-
},
And, after using buildout-versions to update versions.cfg, we should
probably merge the automatically added things into their appropriate
section in versions.cfg.
[13]
Does buildout-versions help us notice depende...