summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbst-marge-bot <marge-bot@buildstream.build>2019-04-23 15:55:43 +0000
committerbst-marge-bot <marge-bot@buildstream.build>2019-04-23 15:55:43 +0000
commitb44833516dc7b66b2423dc973a2a01748e833c3d (patch)
tree36ed368ff63886251157112f80a5717e02178a6d
parent58d8b1c7c22b9cf67a73d930ac62a78d9a396c4d (diff)
parentc400e026a3c393f90eed623264dbf9341a84902d (diff)
downloadbuildstream-b44833516dc7b66b2423dc973a2a01748e833c3d.tar.gz
Merge branch 'phil/1008' into 'master'
setup.py: Include buildstream.testing datafiles in package_data Closes #1008 See merge request BuildStream/buildstream!1309
-rwxr-xr-xsetup.py19
1 files changed, 17 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index 0154b4ec5..c550fdd0b 100755
--- a/setup.py
+++ b/setup.py
@@ -25,6 +25,8 @@ import subprocess
import sys
import versioneer
+from pathlib import Path
+
##################################################################
# Python requirements
@@ -118,6 +120,19 @@ def list_man_pages():
#####################################################
+# List the data files needed by buildstream.testing #
+#####################################################
+#
+# List the datafiles which need to be installed for the
+# buildstream.testing package
+#
+def list_testing_datafiles():
+ bst_dir = Path(os.path.dirname(os.path.abspath(__file__)))
+ data_dir = bst_dir.joinpath('buildstream', 'testing', '_sourcetests', 'project')
+ return [str(f) for f in data_dir.rglob('*')]
+
+
+#####################################################
# Conditional Checks #
#####################################################
#
@@ -322,8 +337,8 @@ setup(name='BuildStream',
python_requires='~={}.{}'.format(REQUIRED_PYTHON_MAJOR, REQUIRED_PYTHON_MINOR),
packages=find_packages(exclude=('tests', 'tests.*')),
package_data={'buildstream': ['plugins/*/*.py', 'plugins/*/*.yaml',
- 'data/*.yaml', 'data/*.sh.in']},
- include_package_data=True,
+ 'data/*.yaml', 'data/*.sh.in',
+ *list_testing_datafiles()]},
data_files=[
# This is a weak attempt to integrate with the user nicely,
# installing things outside of the python package itself with pip is