summaryrefslogtreecommitdiff
path: root/baserockimport/app.py
diff options
context:
space:
mode:
authorRichard Ipsum <richard.ipsum@codethink.co.uk>2015-06-19 15:17:33 +0100
committerRichard Ipsum <richard.ipsum@codethink.co.uk>2015-08-26 14:38:11 +0000
commit5957c58e8113439e3ef36ff646eb52695085046d (patch)
treef1009b3a8a1a3cb7ef02d6cb7a1759b60796e095 /baserockimport/app.py
parentca1d08d765cc298bb4eeee9a2182aa67de657f5f (diff)
downloadimport-5957c58e8113439e3ef36ff646eb52695085046d.tar.gz
Use virtualenv and Pip to find runtime deps; remove searching for upstream
Co-authored-by: Sam Thursfield <sam.thursfield@codethink.co.uk> 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
Diffstat (limited to 'baserockimport/app.py')
-rw-r--r--baserockimport/app.py3
1 files changed, 2 insertions, 1 deletions
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()