Commit 5d4e92e5 authored by Gary Poster's avatar Gary Poster

revert attempt to skip some of the pkg_resources dance: it caused me trouble.

parent 1fae78f7
......@@ -1442,12 +1442,7 @@ namespace_add_site_packages_setup = '''
import pkg_resources'''
addsitedir_namespace_originalpackages_snippet = '''
for dist in pkg_resources.find_distributions(sitedir, True):
pkg_resources.fixup_namespace_packages(dist.location)
if dist.has_metadata('namespace_packages.txt'):
for namespace in dist.get_metadata_lines(
'namespace_packages.txt'):
pkg_resources.declare_namespace(namespace)'''
pkg_resources.working_set.add_entry(sitedir)'''
original_path_snippet = '''
original_paths = [
......
......@@ -1287,12 +1287,7 @@ call to another text fixture to create.
if not sitedircase in known_paths and os.path.exists(sitedir):
sys.path.append(sitedir)
known_paths.add(sitedircase)
for dist in pkg_resources.find_distributions(sitedir, True):
pkg_resources.fixup_namespace_packages(dist.location)
if dist.has_metadata('namespace_packages.txt'):
for namespace in dist.get_metadata_lines(
'namespace_packages.txt'):
pkg_resources.declare_namespace(namespace)
pkg_resources.working_set.add_entry(sitedir)
original_paths = [
...
]
......@@ -1354,12 +1349,7 @@ at that result.
if not sitedircase in known_paths and os.path.exists(sitedir):
sys.path.append(sitedir)
known_paths.add(sitedircase)
for dist in pkg_resources.find_distributions(sitedir, True):
pkg_resources.fixup_namespace_packages(dist.location)
if dist.has_metadata('namespace_packages.txt'):
for namespace in dist.get_metadata_lines(
'namespace_packages.txt'):
pkg_resources.declare_namespace(namespace)
pkg_resources.working_set.add_entry(sitedir)
original_paths = [
...
]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment