diff options
author | Pradyun Gedam <pradyunsg@users.noreply.github.com> | 2021-11-05 12:44:54 +0000 |
---|---|---|
committer | Pradyun Gedam <pradyunsg@users.noreply.github.com> | 2021-11-26 11:50:21 +0000 |
commit | 7510fb04b6d12487a7de2d49cad8cb29366a6ae2 (patch) | |
tree | ba62f995a40f45a06c0b288715ad29d678a436be /tools | |
parent | c6037c7bbda548caae24b3df698ee6cbc5b0d67a (diff) | |
download | pip-7510fb04b6d12487a7de2d49cad8cb29366a6ae2.tar.gz |
Vendor rich and required dependencies (pygments, typing_extensions)
This will enable building upon these libraries, to improve the
presentation style and output.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/vendoring/patches/pygments.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tools/vendoring/patches/pygments.patch b/tools/vendoring/patches/pygments.patch new file mode 100644 index 000000000..3cabf9d6d --- /dev/null +++ b/tools/vendoring/patches/pygments.patch @@ -0,0 +1,37 @@ +This patch mainly handles tweaking imports into a form that can be transformed +to import from the vendored namespace. + +diff --git a/src/pip/_vendor/pygments/cmdline.py b/src/pip/_vendor/pygments/cmdline.py +index d9a0fdc8b..db6de0cd3 100644 +--- a/src/pip/_vendor/pygments/cmdline.py ++++ b/src/pip/_vendor/pygments/cmdline.py +@@ -410,11 +410,11 @@ def is_only_option(opt): + outfile = UnclosingTextIOWrapper(outfile, encoding=fmter.encoding) + fmter.encoding = None + try: +- import colorama.initialise ++ import colorama.initialise as colorama_initialise + except ImportError: + pass + else: +- outfile = colorama.initialise.wrap_stream( ++ outfile = colorama_initialise.wrap_stream( + outfile, convert=None, strip=None, autoreset=False, wrap=True) + + # When using the LaTeX formatter and the option `escapeinside` is +diff --git a/src/pip/_vendor/pygments/__main__.py b/src/pip/_vendor/pygments/__main__.py +index c6e2517df..76255b525 100644 +--- a/src/pip/_vendor/pygments/__main__.py ++++ b/src/pip/_vendor/pygments/__main__.py +@@ -9,9 +9,9 @@ + """ + + import sys +-import pygments.cmdline ++from pygments.cmdline import main + + try: +- sys.exit(pygments.cmdline.main(sys.argv)) ++ sys.exit(main(sys.argv)) + except KeyboardInterrupt: + sys.exit(1) |