forked from paylogic/pip-accel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fallback from pip._vendor imports to environment wide imports
- Loading branch information
Showing
2 changed files
with
18 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# Accelerator for pip, the Python package manager. | ||
# | ||
# Author: Peter Odding <[email protected]> | ||
# Last Change: November 7, 2015 | ||
# Last Change: January 17, 2016 | ||
# URL: https://github.com/paylogic/pip-accel | ||
|
||
""" | ||
|
@@ -38,10 +38,17 @@ | |
|
||
# External dependencies. | ||
from cached_property import cached_property | ||
from pip._vendor.distlib.util import ARCHIVE_EXTENSIONS | ||
from pip._vendor.pkg_resources import find_distributions | ||
from pip.req import InstallRequirement | ||
|
||
# The following package(s) are usually bundled with pip but may be unbundled | ||
# by redistributors and pip-accel should handle this gracefully. | ||
try: | ||
from pip._vendor.distlib.util import ARCHIVE_EXTENSIONS | ||
from pip._vendor.pkg_resources import find_distributions | ||
except ImportError: | ||
from distlib.util import ARCHIVE_EXTENSIONS | ||
from pkg_resources import find_distributions | ||
|
||
|
||
class Requirement(object): | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# Utility functions for the pip accelerator. | ||
# | ||
# Author: Peter Odding <[email protected]> | ||
# Last Change: January 10, 2016 | ||
# Last Change: January 17, 2016 | ||
# URL: https://github.com/paylogic/pip-accel | ||
|
||
""" | ||
|
@@ -26,12 +26,13 @@ | |
# External dependencies. | ||
from humanfriendly import parse_path | ||
from pip.commands.uninstall import UninstallCommand | ||
from pip._vendor.pkg_resources import ( | ||
DistributionNotFound, | ||
WorkingSet, | ||
get_distribution, | ||
parse_requirements, | ||
) | ||
|
||
# The following package(s) are usually bundled with pip but may be unbundled | ||
# by redistributors and pip-accel should handle this gracefully. | ||
try: | ||
from pip._vendor.pkg_resources import DistributionNotFound, WorkingSet, get_distribution, parse_requirements | ||
except ImportError: | ||
from pkg_resources import DistributionNotFound, WorkingSet, get_distribution, parse_requirements | ||
|
||
# Initialize a logger for this module. | ||
logger = logging.getLogger(__name__) | ||
|