Mercurial > hgrepos > Python2 > PyMuPDF
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 17:dd9cdb856310 | 18:dd663470c57c |
|---|---|
| 1770 | 1770 |
| 1771 We run a `git ls-files` command internally. | 1771 We run a `git ls-files` command internally. |
| 1772 | 1772 |
| 1773 This function can be useful for the `fn_sdist()` callback. | 1773 This function can be useful for the `fn_sdist()` callback. |
| 1774 ''' | 1774 ''' |
| 1775 command = 'cd ' + directory + ' && git ls-files' | 1775 if os.path.isdir(os.path.join(directory, ".hg")): |
| 1776 if submodules: | 1776 command = 'cd ' + directory + ' && hg files' |
| 1777 command += ' --recurse-submodules' | 1777 if submodules: |
| 1778 command += ' --subrepos' | |
| 1779 else: | |
| 1780 command = 'cd ' + directory + ' && git ls-files' | |
| 1781 if submodules: | |
| 1782 command += ' --recurse-submodules' | |
| 1778 log1(f'Running {command=}') | 1783 log1(f'Running {command=}') |
| 1779 text = subprocess.check_output( command, shell=True) | 1784 text = subprocess.check_output( command, shell=True) |
| 1780 ret = [] | 1785 ret = [] |
| 1781 for path in text.decode('utf8').strip().split( '\n'): | 1786 for path in text.decode('utf8').strip().split( '\n'): |
| 1782 path2 = os.path.join(directory, path) | 1787 path2 = os.path.join(directory, path) |
