summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorPhil Dawson <phil.dawson@codethink.co.uk>2019-04-23 13:59:57 +0100
committerPhil Dawson <phil.dawson@codethink.co.uk>2019-04-23 16:01:07 +0100
commitc400e026a3c393f90eed623264dbf9341a84902d (patch)
tree36ed368ff63886251157112f80a5717e02178a6d /setup.py
parent58d8b1c7c22b9cf67a73d930ac62a78d9a396c4d (diff)
downloadbuildstream-c400e026a3c393f90eed623264dbf9341a84902d.tar.gz
setup.py: Include buildstream.testing datafiles in package_data
* Remove `include_package_data=True` from setup.py * Collect datafiles for buildstream.testing by adding them to `package_data` Fixes #1008
Diffstat (limited to 'setup.py')
-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