mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-05 18:50:09 +02:00
build: replace exclude with filter during source tar creation
Replace the deprecated exclude argument with filter in build.py allowing users of Python 3.7 to use the fdroid CLI Closes #531
This commit is contained in:
parent
e8306fbde0
commit
7bdffde804
@ -568,9 +568,9 @@ def build_local(app, build, vcs, build_dir, output_dir, log_dir, srclib_dir, ext
|
||||
tarname = common.getsrcname(app, build)
|
||||
tarball = tarfile.open(os.path.join(tmp_dir, tarname), "w:gz")
|
||||
|
||||
def tarexc(f):
|
||||
return any(f.endswith(s) for s in ['.svn', '.git', '.hg', '.bzr'])
|
||||
tarball.add(build_dir, tarname, exclude=tarexc)
|
||||
def tarexc(t):
|
||||
return None if any(t.name.endswith(s) for s in ['.svn', '.git', '.hg', '.bzr']) else t
|
||||
tarball.add(build_dir, tarname, filter=tarexc)
|
||||
tarball.close()
|
||||
|
||||
# Run a build command if one is required...
|
||||
|
Loading…
Reference in New Issue
Block a user