Skip to content

Commit

Permalink
fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
loechel committed Jul 7, 2017
2 parents 292bd23 + 2018b6e commit 17b54f3
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/z3c/autoinclude/dependency.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,8 @@ order::
>>> dummy = xmlconfig.file(resource_filename('a', 'configure.zcml'),
... package=a)
>>> from testdirective.zcml import test_log
>>> pprint(test_log, width=30)
[u'f.g meta has been loaded',
u'f.h has been loaded',
u'BCPackage has been loaded']
>>> pprint(test_log)
[u'f.g meta has been loaded', u'f.h has been loaded', u'b.c has been loaded']

There is also a directive for including overrides, which calls
``autoIncludeOverridesDirective``; however, I have no idea how to test
Expand Down
2 changes: 1 addition & 1 deletion src/z3c/autoinclude/tests/b.c/b/c/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#
# sanity test
#sanity test
32 changes: 32 additions & 0 deletions src/z3c/autoinclude/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,13 @@ def distributionForDottedName(package_dottedname):
continue
ns_packages = namespaceDottedNames(dist)
packages = find_packages(dist.location)
<<<<<<< HEAD
# if package_dottedname in ns_packages:
# continue
=======
#if package_dottedname in ns_packages:
#continue
>>>>>>> 2018b6eae6c3ec3a5968b56167753f388710b8ac
if package_dottedname not in packages:
continue
if dist.key.lower() == package_dottedname.lower():
Expand Down Expand Up @@ -174,7 +179,10 @@ def namespaceDottedNames(dist):
ns_dottednames = []
return ns_dottednames

<<<<<<< HEAD

=======
>>>>>>> 2018b6eae6c3ec3a5968b56167753f388710b8ac
def isUnzippedEgg(path):
"""
Check whether a filesystem path points to an unzipped egg; z3c.autoinclude
Expand All @@ -184,10 +192,20 @@ def isUnzippedEgg(path):
"""
return os.path.isdir(path)

<<<<<<< HEAD

CACHE = {}


=======
CACHE = {}
### cargo-culted from setuptools 0.6c9's __init__.py;
# importing setuptools is unsafe, but i can't find any
# way to get the information that find_packages provides
# using pkg_resources and i can't figure out a way to
# avoid needing it.
from distutils.util import convert_path
>>>>>>> 2018b6eae6c3ec3a5968b56167753f388710b8ac
def find_packages(where='.', exclude=()):
"""Return a list all Python packages found within directory 'where'
Expand All @@ -203,6 +221,7 @@ def find_packages(where='.', exclude=()):
out = []
stack = [(convert_path(where), '')]
while stack:
<<<<<<< HEAD
where, prefix = stack.pop(0)
os.listdir(where)
for name in os.listdir(where):
Expand All @@ -214,5 +233,18 @@ def find_packages(where='.', exclude=()):
for pat in list(exclude) + ['ez_setup']:
from fnmatch import fnmatchcase
out = [item for item in out if not fnmatchcase(item, pat)]
=======
where,prefix = stack.pop(0)
os.listdir(where)
for name in os.listdir(where):
fn = os.path.join(where,name)
if ('.' not in name and os.path.isdir(fn)):
stack.append((fn, prefix+name+'.'))
if os.path.isfile(os.path.join(fn, '__init__.py')):
out.append(prefix+name)
for pat in list(exclude)+['ez_setup']:
from fnmatch import fnmatchcase
out = [item for item in out if not fnmatchcase(item,pat)]
>>>>>>> 2018b6eae6c3ec3a5968b56167753f388710b8ac
CACHE[original_where] = out
return out

0 comments on commit 17b54f3

Please sign in to comment.