diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2019-07-01 20:12:58 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-07-01 21:11:39 +0300 |
commit | ba6c0cab8fd516c414c3f5cb76bebc0d93b50e30 (patch) | |
tree | 2d7d2e5d4ccbf414e289c1987723dda47bf146e6 /mesonbuild/scripts/dist.py | |
parent | 33aee8d113c09d51ef183e692164bc5374e80f73 (diff) | |
download | meson-ba6c0cab8fd516c414c3f5cb76bebc0d93b50e30.zip meson-ba6c0cab8fd516c414c3f5cb76bebc0d93b50e30.tar.gz meson-ba6c0cab8fd516c414c3f5cb76bebc0d93b50e30.tar.bz2 |
Use the same directory names for dist so that ccache works. Closes #5583.
Diffstat (limited to 'mesonbuild/scripts/dist.py')
-rw-r--r-- | mesonbuild/scripts/dist.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/mesonbuild/scripts/dist.py b/mesonbuild/scripts/dist.py index 47fde23..1a62c70 100644 --- a/mesonbuild/scripts/dist.py +++ b/mesonbuild/scripts/dist.py @@ -144,11 +144,15 @@ def create_dist_hg(dist_name, src_root, bld_root, dist_sub, dist_scripts): return (xzname, ) -def check_dist(packagename, meson_command): +def check_dist(packagename, meson_command, privdir): print('Testing distribution package %s' % packagename) - unpackdir = tempfile.mkdtemp() - builddir = tempfile.mkdtemp() - installdir = tempfile.mkdtemp() + unpackdir = os.path.join(privdir, 'dist-unpack') + builddir = os.path.join(privdir, 'dist-build') + installdir = os.path.join(privdir, 'dist-install') + for p in (unpackdir, builddir, installdir): + if os.path.exists(p): + shutil.rmtree(p) + os.mkdir(p) ninja_bin = detect_ninja() try: tf = tarfile.open(packagename) @@ -200,7 +204,7 @@ def run(args): return 1 error_count = 0 for name in names: - rc = check_dist(name, meson_command) # Check only one. + rc = check_dist(name, meson_command, priv_dir) # Check only one. if rc == 0: create_hash(name) error_count += rc |