summaryrefslogtreecommitdiffstats
path: root/__root__
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2015-01-09 18:21:07 +0100
committerJan Pokorný <jpokorny@redhat.com>2015-01-09 19:48:44 +0100
commitba13eded9974eca0ada39235f42f965dfa4903ab (patch)
tree533a54a11be487c3163daf53a7063608be4c2b5d /__root__
parent84a750389e298429b412a4fbbe7006f31285c40c (diff)
downloadclufter-ba13eded9974eca0ada39235f42f965dfa4903ab.tar.gz
clufter-ba13eded9974eca0ada39235f42f965dfa4903ab.tar.xz
clufter-ba13eded9974eca0ada39235f42f965dfa4903ab.zip
setup: dot-containing initial dir for discovery is OK
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to '__root__')
-rw-r--r--__root__/setup.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/__root__/setup.py b/__root__/setup.py
index 711c9b2..1613ec9 100644
--- a/__root__/setup.py
+++ b/__root__/setup.py
@@ -72,8 +72,11 @@ def find_packages(where=None, exclude=()):
where = getcwd()
excl_set = set(e.strip('*.') for e in exclude) # rough overapproximation!
for root, dirs, files in walk(where, followlinks=True):
- assert '.' not in root
- pkg_root = root[len(where):].lstrip(sep).replace(sep, '.')
+ pkg_root = root[len(where):].lstrip(sep)
+ if '.' in pkg_root: # avoid *.egg-info and the like/invalid pkg name
+ dirs[:] = []
+ continue
+ pkg_root = pkg_root.replace(sep, '.')
dirs[:] = [d for d in dirs
if d not in excl_set
and '.' not in d