Skip to content

Commit

Permalink
Merge pull request #4842 from pypa/vendor/pythonfinder
Browse files Browse the repository at this point in the history
update vendor pythonfinder
  • Loading branch information
frostming committed Nov 8, 2021
2 parents 38fb96b + 1c60ba2 commit 92e32ca
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 6 deletions.
1 change: 1 addition & 0 deletions news/4837.vendor.rst
@@ -0,0 +1 @@
Update ``pythonfinder`` from ``1.2.8`` to ``1.2.9``.
20 changes: 20 additions & 0 deletions pipenv/vendor/pythonfinder/LICENSE.txt
@@ -0,0 +1,20 @@
Copyright (c) 2018 Dan Ryan

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2 changes: 1 addition & 1 deletion pipenv/vendor/pythonfinder/__init__.py
Expand Up @@ -10,7 +10,7 @@
from .models import SystemPath, WindowsFinder
from .pythonfinder import Finder

__version__ = "1.2.8"
__version__ = "1.2.9"


logger = logging.getLogger(__name__)
Expand Down
9 changes: 6 additions & 3 deletions pipenv/vendor/pythonfinder/models/python.py
Expand Up @@ -3,6 +3,7 @@

import logging
import operator
import os
import platform
import sys
from collections import defaultdict
Expand Down Expand Up @@ -133,6 +134,8 @@ def get_bin_dir(self, base):
# type: (Union[Path, str]) -> Path
if isinstance(base, six.string_types):
base = Path(base)
if os.name == "nt":
return base
return base / "bin"

@classmethod
Expand Down Expand Up @@ -451,9 +454,9 @@ def matches(
if arch.isdigit():
arch = "{0}bit".format(arch)
if (
(major is None or self.major and self.major == major)
and (minor is None or self.minor and self.minor == minor)
and (patch is None or self.patch and self.patch == patch)
(major is None or self.major == major)
and (minor is None or self.minor == minor)
and (patch is None or self.patch == patch)
and (pre is None or self.is_prerelease == pre)
and (dev is None or self.is_devrelease == dev)
and (arch is None or own_arch == arch)
Expand Down
2 changes: 2 additions & 0 deletions pipenv/vendor/pythonfinder/models/windows.py
Expand Up @@ -92,6 +92,8 @@ def get_versions(self):
path = ensure_path(install_path.__getattr__(""))
except AttributeError:
continue
if not path.exists():
continue
try:
py_version = PythonVersion.from_windows_launcher(
version_object, name=name, company=company
Expand Down
2 changes: 1 addition & 1 deletion pipenv/vendor/pythonfinder/utils.py
Expand Up @@ -62,7 +62,7 @@
KNOWN_EXTS = KNOWN_EXTS | set(
filter(None, os.environ.get("PATHEXT", "").split(os.pathsep))
)
PY_MATCH_STR = r"((?P<implementation>{0})(?:\d?(?:\.\d[cpm]{{0,3}}))?(?:-?[\d\.]+)*)".format(
PY_MATCH_STR = r"((?P<implementation>{0})(?:\d?(?:\.\d[cpm]{{0,3}}))?(?:-?[\d\.]+)*(?!w))".format(
"|".join(PYTHON_IMPLEMENTATIONS)
)
EXE_MATCH_STR = r"{0}(?:\.(?P<ext>{1}))?".format(PY_MATCH_STR, "|".join(KNOWN_EXTS))
Expand Down
2 changes: 1 addition & 1 deletion pipenv/vendor/vendor.txt
Expand Up @@ -35,7 +35,7 @@ ptyprocess==0.7.0
pyparsing==2.4.7
python-dateutil==2.8.2
python-dotenv==0.19.0
pythonfinder==1.2.8
pythonfinder==1.2.9
requests==2.26.0
requirementslib==1.6.1
shellingham==1.4.0
Expand Down

0 comments on commit 92e32ca

Please sign in to comment.