jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/397617 )
Change subject: Make it possible to install existing python modules "editably"
......................................................................
Make it possible to install existing python modules "editably"
This is a small change to make the pip rules refresh correctly when passing
an existing git repo to `pip install -e`.
Bug: T181850
Change-Id: I6f31ec47541370576f97f5512091189ff2cc7b48
---
M puppet/modules/virtualenv/manifests/package.pp
1 file changed, 9 insertions(+), 6 deletions(-)
Approvals:
Gergő Tisza: Looks good to me, approved
jenkins-bot: Verified
Zoranzoki21: Looks good to me, but someone else must approve
diff --git a/puppet/modules/virtualenv/manifests/package.pp
b/puppet/modules/virtualenv/manifests/package.pp
index 539dfc2..581d3ea 100644
--- a/puppet/modules/virtualenv/manifests/package.pp
+++ b/puppet/modules/virtualenv/manifests/package.pp
@@ -9,7 +9,8 @@
# == Parameters
# [*path*]
# Path to already previously initialized virtualenv.
-# The package will be available under $path/src/$python_module.
+# For editable installs, the package will be available under
+# $path/src/$python_module.
#
# [*package*]
# Pip package to install. Default: $title
@@ -20,9 +21,11 @@
# already installed in the virtualenv. Default: $title
#
# [*editable*]
-# Intall package in editable mode (pip -e), ie. does a git clone into the
+# Install package in editable mode (pip -e), ie. does a git clone into the
# main venv folder instead of installing a subset of the files only into
# ./lib. You probably need to use the 'package' parameter if you use this.
+# If the package parameter points to a local path, link to that source
+# rather than cloning the source into ${path}/src.
# Default: false
#
define virtualenv::package (
@@ -42,10 +45,10 @@
unless => "${path}/bin/python -c 'import ${python_module}'",
}
exec { "pip_install_${python_module}_editable_in_${path}":
- command => "${path}/bin/pip install -e ${package}",
- cwd => $path,
- creates => "${path}/src/${python_module}",
- subscribe =>
Exec["pip_install_${python_module}_dependencies_in_${path}"],
+ command => "${path}/bin/pip install -e ${package}",
+ cwd => $path,
+ refreshonly => true,
+ subscribe =>
Exec["pip_install_${python_module}_dependencies_in_${path}"],
}
} else {
exec { "pip_install_${python_module}_in_${path}":
--
To view, visit https://gerrit.wikimedia.org/r/397617
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6f31ec47541370576f97f5512091189ff2cc7b48
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Awight <[email protected]>
Gerrit-Reviewer: BryanDavis <[email protected]>
Gerrit-Reviewer: Dduvall <[email protected]>
Gerrit-Reviewer: Gergő Tisza <[email protected]>
Gerrit-Reviewer: Halfak <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Zoranzoki21 <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits