Skip to content

Commit

Permalink
don't import pip
Browse files Browse the repository at this point in the history
pip.get_installed_distributions references pkg_resources.working_set so
do that instead
  • Loading branch information
tdsmith committed Oct 7, 2015
1 parent 2ea1697 commit f5c6445
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions poet/poet.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import codecs

from jinja2 import Template
import pip
import pkg_resources
import tl.eggdeps.graph

from .version import __version__
Expand Down Expand Up @@ -116,7 +116,7 @@ def make_graph(pkg):
ignore = ['argparse', 'pip', 'setuptools', 'wsgiref']

dependencies = {key: {} for key in egg_graph.keys() if key not in ignore}
installed_packages = pip.get_installed_distributions()
installed_packages = pkg_resources.working_set
versions = {package.key: package.version for package in installed_packages}
for package in dependencies:
try:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4'
],
install_requires = ['jinja2', 'pip', 'tl.eggdeps'],
install_requires = ['jinja2', 'setuptools', 'tl.eggdeps'],
entry_points = {'console_scripts': ['poet=poet:main']}
)

0 comments on commit f5c6445

Please sign in to comment.