Skip to content

Commit 26b4bfb

Browse files
authored
Merge pull request #32 from dls-controls/vg
Only look at _version_git in immediate subdirs
2 parents 5e478cf + 3618d94 commit 26b4bfb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
from epicscorelibs.config import get_config_var
99

1010
# Place the directory containing _version_git on the path
11-
for path, _, filenames in os.walk(os.path.dirname(os.path.abspath(__file__))):
12-
if "_version_git.py" in filenames:
13-
sys.path.append(path)
14-
break
11+
TOP = os.path.dirname(os.path.abspath(__file__))
12+
for d in os.listdir(TOP):
13+
if os.path.exists(os.path.join(TOP, d, "_version_git.py")):
14+
sys.path.append(os.path.join(TOP, d))
1515

1616
from _version_git import __version__, get_cmdclass # noqa
1717

0 commit comments

Comments
 (0)