Closed Bug 748624 Opened 12 years ago Closed 12 years ago

mozharness query_python_site_packages_path()

Categories

(Release Engineering :: Applications: MozharnessCore, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mozilla, Assigned: mozilla)

Details

(Whiteboard: [mozharness])

Attachments

(1 file)

This patch adds a VirtualenvMixin.query_python_site_packages_path().

I'm currently using this in device_talosrunner.py to find the mozdevice directory, so I can import devicemanagerSUT.  I imagine this isn't a foolproof method, but it works in at least this case.

https://github.com/escapewindow/mozharness/blob/talosrunner/mozharness/mozilla/testing/device.py#L449
Attachment #618125 - Flags: review?(jhammel)
Comment on attachment 618125 [details] [diff] [review]
add query_python_site_packages_path()

Looks good. It will be nice to be able to import modules from the created virtualenv.
Attachment #618125 - Flags: review?(jhammel) → review+
It might be nice to add an e.g. import_from_virtualenv() method.  I'll probably add this when/if i need such a thing
Comment on attachment 618125 [details] [diff] [review]
add query_python_site_packages_path()

http://hg.mozilla.org/build/mozharness/rev/8fcc5407f1e8
Attachment #618125 - Flags: checked-in+
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
(In reply to Jeff Hammel [:jhammel] from comment #2)
> It might be nice to add an e.g. import_from_virtualenv() method.  I'll
> probably add this when/if i need such a thing

sgtm.
Product: mozilla.org → Release Engineering
Component: General Automation → Mozharness
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: