MCPcopy Create free account
hub / github.com/libgit2/pygit2 / get_file_list

Method get_file_list

setup.py:50–72  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

48
49class sdist_files_from_git(sdist):
50 def get_file_list(self) -> None:
51 popen = Popen(
52 ['git', 'ls-files'], stdout=PIPE, stderr=PIPE, universal_newlines=True
53 )
54 stdoutdata, stderrdata = popen.communicate()
55 if popen.returncode != 0:
56 print(stderrdata)
57 sys.exit()
58
59 def exclude(line: str) -> bool:
60 for prefix in ['.', 'docs/', 'misc/']:
61 if line.startswith(prefix):
62 return True
63 return False
64
65 for line in stdoutdata.splitlines():
66 if not exclude(line):
67 self.filelist.append(line)
68
69 # Ok
70 self.filelist.sort()
71 self.filelist.remove_duplicates()
72 self.write_manifest()
73
74
75classifiers = [

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected