mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Ignore whitespace when patching
Signed-off-by: Dan Ryan <dan@danryan.co>
This commit is contained in:
@@ -58,7 +58,9 @@ FILE_WHITE_LIST = (
|
||||
'vendor_pip.txt',
|
||||
)
|
||||
|
||||
PATCHED_RENAMES = {}
|
||||
PATCHED_RENAMES = {
|
||||
'pip': 'notpip'
|
||||
}
|
||||
|
||||
LIBRARY_RENAMES = {
|
||||
'pip': 'notpip'
|
||||
@@ -162,7 +164,7 @@ def rewrite_file_imports(item, vendored_libs, vendor_dir):
|
||||
|
||||
def apply_patch(ctx, patch_file_path):
|
||||
log('Applying patch %s' % patch_file_path.name)
|
||||
ctx.run('git apply --verbose %s' % patch_file_path)
|
||||
ctx.run('git apply --ignore-whitespace --verbose %s' % patch_file_path)
|
||||
|
||||
|
||||
@invoke.task
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/pipenv/patched/notpip/_vendor/distlib/index.py b/pipenv/patched/notpip/_vendor/distlib/index.py
|
||||
index 6803dd2..25b96f9 100644
|
||||
index 2406be21..7a87cdcf 100644
|
||||
--- a/pipenv/patched/notpip/_vendor/distlib/index.py
|
||||
+++ b/pipenv/patched/notpip/_vendor/distlib/index.py
|
||||
@@ -22,7 +22,7 @@ from .util import cached_property, zip_dir, ServerProxy
|
||||
@@ -12,11 +12,11 @@ index 6803dd2..25b96f9 100644
|
||||
|
||||
class PackageIndex(object):
|
||||
diff --git a/pipenv/patched/notpip/_vendor/distlib/locators.py b/pipenv/patched/notpip/_vendor/distlib/locators.py
|
||||
index 14789ef..c25f629 100644
|
||||
index 11d26361..cb05b184 100644
|
||||
--- a/pipenv/patched/notpip/_vendor/distlib/locators.py
|
||||
+++ b/pipenv/patched/notpip/_vendor/distlib/locators.py
|
||||
@@ -36,7 +36,7 @@ logger = logging.getLogger(__name__)
|
||||
HASHER_HASH = re.compile('^(\w+)=([a-f0-9]+)')
|
||||
HASHER_HASH = re.compile(r'^(\w+)=([a-f0-9]+)')
|
||||
CHARSET = re.compile(r';\s*charset\s*=\s*(.*)\s*$', re.I)
|
||||
HTML_CONTENT_TYPE = re.compile('text/html|application/x(ht)?ml')
|
||||
-DEFAULT_INDEX = 'https://pypi.python.org/pypi'
|
||||
@@ -24,16 +24,16 @@ index 14789ef..c25f629 100644
|
||||
|
||||
def get_all_distribution_names(url=None):
|
||||
"""
|
||||
@@ -193,7 +193,7 @@ class Locator(object):
|
||||
is_wheel = basename.endswith('.whl')
|
||||
@@ -197,7 +197,7 @@ class Locator(object):
|
||||
is_downloadable = basename.endswith(self.downloadable_extensions)
|
||||
if is_wheel:
|
||||
compatible = is_compatible(Wheel(basename), self.wheel_tags)
|
||||
- return (t.scheme != 'https', 'pypi.python.org' in t.netloc,
|
||||
+ return (t.scheme != 'https', 'pypi.org' in t.netloc,
|
||||
is_wheel, compatible, basename)
|
||||
- return (t.scheme == 'https', 'pypi.python.org' in t.netloc,
|
||||
+ return (t.scheme == 'https', 'pypi.org' in t.netloc,
|
||||
is_downloadable, is_wheel, compatible, basename)
|
||||
|
||||
def prefer_url(self, url1, url2):
|
||||
@@ -1037,7 +1037,7 @@ class AggregatingLocator(Locator):
|
||||
@@ -1046,7 +1046,7 @@ class AggregatingLocator(Locator):
|
||||
# versions which don't conform to PEP 426 / PEP 440.
|
||||
default_locator = AggregatingLocator(
|
||||
JSONLocator(),
|
||||
@@ -41,4 +41,4 @@ index 14789ef..c25f629 100644
|
||||
+ SimpleScrapingLocator('https://pypi.org/simple/',
|
||||
timeout=3.0),
|
||||
scheme='legacy')
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
diff --git a/pipenv/patched/notpip/_vendor/pkg_resources/__init__.py b/pipenv/patched/notpip/_vendor/pkg_resources/__init__.py
|
||||
index eed9228..7b7da00 100644
|
||||
--- a/pipenv/notpip/notpip/_vendor/pkg_resources/__init__.py
|
||||
+++ b/pipenv/notpip/notpip/_vendor/pkg_resources/__init__.py
|
||||
--- a/pipenv/patched/notpip/_vendor/pkg_resources/__init__.py
|
||||
+++ b/pipenv/patched/notpip/_vendor/pkg_resources/__init__.py
|
||||
@@ -74,13 +74,8 @@ __import__('notpip._vendor.packaging.specifiers')
|
||||
__import__('notpip._vendor.packaging.requirements')
|
||||
__import__('notpip._vendor.packaging.markers')
|
||||
|
||||
@@ -11,7 +11,6 @@ index e0e2d24c..d6d07e77 100644
|
||||
sdist_args.append('-c')
|
||||
sdist_args.append(SETUPTOOLS_SHIM % setup_py)
|
||||
sdist_args.append('sdist')
|
||||
|
||||
diff --git a/pipenv/patched/pip/_internal/index.py b/pipenv/patched/pip/_internal/index.py
|
||||
index 15e0bf37..d5e26697 100644
|
||||
--- a/pipenv/patched/pip/_internal/index.py
|
||||
|
||||
@@ -18,10 +18,10 @@ index 4e6174c..75f9b49 100644
|
||||
|
||||
# NOTE
|
||||
# We used to store the cache dir under ~/.pip-tools, which is not the
|
||||
diff --git a/piptools/repositories/pypi.py b/piptools/repositories/pypi.py
|
||||
diff --git a/pipenv/patched/piptools/repositories/pypi.py b/pipenv/patched/piptools/repositories/pypi.py
|
||||
index 1c4b943..1c808f3 100644
|
||||
--- a/piptools/repositories/pypi.py
|
||||
+++ b/piptools/repositories/pypi.py
|
||||
--- a/pipenv/patched/piptools/repositories/pypi.py
|
||||
+++ b/pipenv/patched/piptools/repositories/pypi.py
|
||||
@@ -15,10 +15,16 @@ from .._compat import (
|
||||
Wheel,
|
||||
FAVORITE_HASH,
|
||||
@@ -404,10 +404,10 @@ index fde5816..d76695d 100644
|
||||
|
||||
return line
|
||||
|
||||
diff --git a/piptools/_compat/pip_compat.py b/piptools/_compat/pip_compat.py
|
||||
diff --git a/pipenv/patched/piptools/_compat/pip_compat.py b/pipenv/patched/piptools/_compat/pip_compat.py
|
||||
index 7e8cdf3..96c8a1e 100644
|
||||
--- a/piptools/_compat/pip_compat.py
|
||||
+++ b/piptools/_compat/pip_compat.py
|
||||
--- a/pipenv/patched/piptools/_compat/pip_compat.py
|
||||
+++ b/pipenv/patched/piptools/_compat/pip_compat.py
|
||||
@@ -1,30 +1,40 @@
|
||||
# -*- coding=utf-8 -*-
|
||||
import importlib
|
||||
|
||||
Reference in New Issue
Block a user