diff --git a/diskimage_builder/elements/__init__.py b/diskimage_builder/elements/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/diskimage_builder/elements/cache-url/tests/test_cache_url.py b/diskimage_builder/elements/cache-url/tests/test_cache_url.py index 8f389e06..e3ac0522 100644 --- a/diskimage_builder/elements/cache-url/tests/test_cache_url.py +++ b/diskimage_builder/elements/cache-url/tests/test_cache_url.py @@ -27,15 +27,15 @@ class TestCacheUrl(base.ScriptTestBase): source = 'http://fake/url' # Write fake data to the target file and return success self._stub_script('curl', 'echo "test" > ${3:7:100}\necho 200') - self._run_command(['elements/cache-url/bin/cache-url', - source, - target]) + self._run_command( + ['diskimage_builder/elements/cache-url/bin/cache-url', + source, target]) self.assertTrue(os.path.exists(target)) modification_time = os.path.getmtime(target) # Make sure that the timestamp would change if the file does time.sleep(1) self._stub_script('curl', 'echo "304"') - self._run_command(['elements/cache-url/bin/cache-url', - source, - target]) + self._run_command( + ['diskimage_builder/elements/cache-url/bin/cache-url', + source, target]) self.assertEqual(modification_time, os.path.getmtime(target)) diff --git a/diskimage_builder/elements/svc-map/__init__.py b/diskimage_builder/elements/svc-map/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/diskimage_builder/lib/common-functions b/diskimage_builder/lib/common-functions index 48b90897..09b81795 100644 --- a/diskimage_builder/lib/common-functions +++ b/diskimage_builder/lib/common-functions @@ -111,11 +111,15 @@ function generate_hooks () { for dir in $(find $element_dir \ -follow -mindepth 1 -maxdepth 1 \ - -type d -not -name tests); do + -type d \ + -not -name tests \ + -not -name __pycache__); do copy_hooks_not_overwrite $dir done for file in $(find $element_dir \ - -follow -maxdepth 1 -type f); do + -follow -maxdepth 1 \ + -type f \ + -not -name '*.pyc'); do cp -t $TMP_HOOKS_PATH -a $file done done