From 5957c58e8113439e3ef36ff646eb52695085046d Mon Sep 17 00:00:00 2001 From: Richard Ipsum Date: Fri, 19 Jun 2015 15:17:33 +0100 Subject: Use virtualenv and Pip to find runtime deps; remove searching for upstream Co-authored-by: Sam Thursfield Since upstream pip do not want to merge https://github.com/pypa/pip/pull/2371 we should avoid depending on this pull request. To find runtime dependencies we now run pip install inside a virtual env then run pip freeze to obtain the dependency set, this has the advantage that nearly all the work is being done by pip. Originally the python extensions were designed to look for upstream git repos, in practice this is unreliable and won't be compatible with obtaining dependencies using pip install, so the downside of this approach is that all lorries will be tarballs, the upshot is that we can now automatically import many packages that we couldn't import before. Another upshot of this approach is that we may be able to consider the removal of a lot of the spec processing and validation code if we're willing to worry less about build dependencies, we're not sure whether we should be willing to worry less about build dependencies though. We've had encouraging results using this patch so far, we are now able to import, without user intervention, packages that failed previously, such as boto, persistent-pineapple, jmespath, coverage, requests also almost imported successfully but appears to require a release of pytest that is uploaded as a zip. Change-Id: I705c6f6bd722df041d17630287382f851008e97a --- baserockimport/app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'baserockimport/app.py') diff --git a/baserockimport/app.py b/baserockimport/app.py index 5f3d435..ae95d58 100644 --- a/baserockimport/app.py +++ b/baserockimport/app.py @@ -227,7 +227,8 @@ class BaserockImportApplication(cliapp.Application): loop = baserockimport.mainloop.ImportLoop(app=self, goal_kind='python', goal_name=package_name, - goal_version=package_version) + goal_version=package_version, + ignore_version_field=True) loop.enable_importer('python', strata=['strata/core.morph'], package_comp_callback=comp) loop.run() -- cgit v1.2.1