Skip to content
This repository has been archived by the owner on Jan 27, 2023. It is now read-only.

Install to Python virtualenv #17

Merged
merged 5 commits into from
Jan 3, 2014
Merged

Conversation

dcarley
Copy link
Contributor

@dcarley dcarley commented Jan 2, 2014

Install Graphite, Carbon, Whisper, and (nearly) all dependencies into a
virtualenv using the stankevich/python module. This retains the same
sandboxing that --install-option/--prefix was doing, but with the added
benefit of:

  • Allowing the version param to upgrade and downgrade the packages without
    writing the pip logic ourselves.
  • Isolating dependencies from the system's Python/pip paths.

Absolute binary paths are used to reference the virtualenv without needing
to source bin/activate each time. Cairo is shimmed into the virtualenv
from the system package because of the reasons described in the class doc.
I've rebased the dependencies against Graphite's requirements.txt to
reference specific versions and dropped:

  • LDAP support: because it has compile dependencies and I'm not aware of
    anyone currently using this functionality from the module.
  • pysqlite2: because Python >=2.6 has this builtin.

I'm using an earlier version of the python module because of the following
bug which causes the virtualenv to be recreated on every run:


/cc @rjw1 @KushalP @philandstuff

I'm 99% sure that a `subscribe` has no effect on a file. You can't notify a
file resource to be evaluated - they are always evaluated. The chaining in
`init.pp` ensures that `::install` always happens before `::config`.
Install Graphite, Carbon, Whisper, and (nearly) all dependencies into a
virtualenv using the `stankevich/python` module. This retains the same
sandboxing that `--install-option`/`--prefix` was doing, but with the added
benefit of:

- Allowing the version param to upgrade and downgrade the packages without
  writing the `pip` logic ourselves.
- Isolating dependencies from the system's Python/pip paths.

Absolute binary paths are used to reference the virtualenv without needing
to `source bin/activate` each time. Cairo is shimmed into the virtualenv
from the system package because of the reasons described in the class doc.
I've rebased the dependencies against Graphite's `requirements.txt` to
reference specific versions and dropped:

- LDAP support: because it has compile dependencies and I'm not aware of
  anyone currently using this functionality from the module.
- pysqlite2: because Python >=2.6 has this builtin.

I'm using an earlier version of the `python` module because of the following
bug which causes the virtualenv to be recreated on every run:

- voxpupuli/puppet-python#46

Tests will be committed separately because they depend on refactoring
currently in unmerged PR #16.
New fixture. Changed paths. No longer testing every package in `::deps`,
since it's a bit pointless.
Use binary from virtualenv to load correct search paths.
@dcarley
Copy link
Contributor Author

dcarley commented Jan 3, 2014

Rebased against #16

rjw1 added a commit that referenced this pull request Jan 3, 2014
@rjw1 rjw1 merged commit 7cc44be into master Jan 3, 2014
@rjw1 rjw1 deleted the virtualenv_tests_with_aggregator branch January 3, 2014 10:10
'python-pysqlite2',
'python-support',
'python-pip',
python::virtualenv { $root_dir: } ->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

who's responsible for actually creating the $root_dir directory?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

turns out it's python::virtualenv, but stankevich/python 1.6.0 had a bug which caused this to fail (fixed by stankevich/python@e6b4b941713, in 1.6.1)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants