summaryrefslogtreecommitdiff
path: root/tests/cachekey
diff options
context:
space:
mode:
authorChandan Singh <csingh43@bloomberg.net>2018-07-30 19:41:57 +0100
committerChandan Singh <csingh43@bloomberg.net>2018-08-15 19:23:04 +0100
commita7a8265090eaba5cb99fec7ad9acbadb84e998de (patch)
tree4c50fcebe239766250e978a1eefd26c269555679 /tests/cachekey
parent9d2442b2794d7a531f50b3f1f9a0c6e4236bd9be (diff)
downloadbuildstream-a7a8265090eaba5cb99fec7ad9acbadb84e998de.tar.gz
Add pip source plugin
`pip` source plugin can stage python packages that are either specified directly in the element definition or picked up from `requirements.txt` from previous sources. In order to support the latter use-case (which is also the primary motivation for this plugin), this plugin requires access to previous sources and hence is an example of a Source Transform source. Also, bump `BST_FORMAT_VERSION` as this patch adds a new core plugin.
Diffstat (limited to 'tests/cachekey')
-rw-r--r--tests/cachekey/project/sources/pip1.bst12
-rw-r--r--tests/cachekey/project/sources/pip1.expected1
-rw-r--r--tests/cachekey/project/target.bst1
-rw-r--r--tests/cachekey/project/target.expected2
4 files changed, 15 insertions, 1 deletions
diff --git a/tests/cachekey/project/sources/pip1.bst b/tests/cachekey/project/sources/pip1.bst
new file mode 100644
index 000000000..ee69efad6
--- /dev/null
+++ b/tests/cachekey/project/sources/pip1.bst
@@ -0,0 +1,12 @@
+kind: import
+
+sources:
+- kind: git
+ url: https://example.com/foo/foobar.git
+ ref: b99955530263172ed1beae52aed7a33885ef781f
+- kind: pip
+ url: https://pypi.example.com/simple
+ packages:
+ - horses
+ - ponies
+ ref: 'horses==0.0.1\nponies==0.0.2'
diff --git a/tests/cachekey/project/sources/pip1.expected b/tests/cachekey/project/sources/pip1.expected
new file mode 100644
index 000000000..11d7c5fae
--- /dev/null
+++ b/tests/cachekey/project/sources/pip1.expected
@@ -0,0 +1 @@
+880d0dc27d6683725cfd68d60156058115a9a53793b14b727fc6d0588a473763 \ No newline at end of file
diff --git a/tests/cachekey/project/target.bst b/tests/cachekey/project/target.bst
index 174215a49..d96645da8 100644
--- a/tests/cachekey/project/target.bst
+++ b/tests/cachekey/project/target.bst
@@ -13,6 +13,7 @@ depends:
- sources/patch1.bst
- sources/patch2.bst
- sources/patch3.bst
+- sources/pip1.bst
- sources/remote1.bst
- sources/remote2.bst
- sources/tar1.bst
diff --git a/tests/cachekey/project/target.expected b/tests/cachekey/project/target.expected
index d6d99895a..3c1cc261f 100644
--- a/tests/cachekey/project/target.expected
+++ b/tests/cachekey/project/target.expected
@@ -1 +1 @@
-e045df890262f7b7c663e64ad0bfba428d9d80ec514df3ddb13313d4ef669b73 \ No newline at end of file
+09620aa58875d96611d22632b7585a0f22f88f5ecca6f5d1915d3e529d036bd8 \ No newline at end of file