Mercurial > hgrepos > Python2 > PyMuPDF
diff mupdf-source/scripts/pipcl.py @ 18:dd663470c57c
Make building an sdist work on FreeBSD and with Mercurial as SCM.
Because of the inclusion of MuPDF symbolic links in tar-files must be
handled also.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Thu, 18 Sep 2025 22:02:17 +0200 |
| parents | 59f1bd90b2a0 |
| children |
line wrap: on
line diff
--- a/mupdf-source/scripts/pipcl.py Thu Sep 18 17:40:40 2025 +0200 +++ b/mupdf-source/scripts/pipcl.py Thu Sep 18 22:02:17 2025 +0200 @@ -1772,9 +1772,14 @@ This function can be useful for the `fn_sdist()` callback. ''' - command = 'cd ' + directory + ' && git ls-files' - if submodules: - command += ' --recurse-submodules' + if os.path.isdir(os.path.join(directory, ".hg")): + command = 'cd ' + directory + ' && hg files' + if submodules: + command += ' --subrepos' + else: + command = 'cd ' + directory + ' && git ls-files' + if submodules: + command += ' --recurse-submodules' log1(f'Running {command=}') text = subprocess.check_output( command, shell=True) ret = []
