stdout=subprocess.PIPE)
out, err = p.communicate()
data = out.decode("utf-8").split("\n")
data = [l for l in data if l.startswith("hard linking")]
data = [l.replace("hard linking ", "") for l in data]
data = ["./" + l.split(" ->")[0] for l in data]
After Change
parser = ArgumentParser(description="Check a created sdist")
parser.add_argument("sdist_name", type=str, nargs=1,
help="The name of the sdist file to check")
args = parser.parse_args()
sdist_name = args.sdist_name[0]
with tarfile.open(sdist_name) as tar:
members = tar.getmembers()