Skip to content

Commit 0cb60ee

Browse files
committed
pass filename to ast.parse in setup.py
1 parent f1428de commit 0cb60ee

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def read(*relpath, **kwargs): # https://blog.ionelmc.ro/2014/05/25/python-packa
4040
with open(init_py_path) as f:
4141
for line in f:
4242
if line.startswith("__version__"):
43-
module = ast.parse(line)
43+
module = ast.parse(line, filename=init_py_path)
4444
expr = module.body[0]
4545
assert isinstance(expr, ast.Assign)
4646
v = expr.value

0 commit comments

Comments
 (0)