pipgrip 0.10.13__py2.py3-none-any.whl → 0.10.15__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
pipgrip/__init__.py CHANGED
@@ -31,4 +31,12 @@
31
31
  #
32
32
  # SPDX-License-Identifier: BSD-3-Clause
33
33
  # version based on .git/refs/tags - make a tag/release locally, or on GitHub (and pull)
34
+ import warnings
35
+
34
36
  from pipgrip._repo_version import version as __version__ # noqa:F401
37
+
38
+ warnings.filterwarnings(
39
+ action="ignore",
40
+ message=".*pkg_resources",
41
+ category=UserWarning,
42
+ )
pipgrip/_repo_version.py CHANGED
@@ -1 +1 @@
1
- version = "0.10.13"
1
+ version = "0.10.15"
pipgrip/cli.py CHANGED
@@ -52,7 +52,12 @@ from pipgrip.libs.mixology.failure import SolverFailure
52
52
  from pipgrip.libs.mixology.package import Package
53
53
  from pipgrip.libs.mixology.version_solver import VersionSolver
54
54
  from pipgrip.package_source import PackageSource, render_pin
55
- from pipgrip.pipper import install_packages, read_requirements
55
+ from pipgrip.pipper import (
56
+ BUILD_FAILURE_STR,
57
+ REPORT_FAILURE_STR,
58
+ install_packages,
59
+ read_requirements,
60
+ )
56
61
 
57
62
  logging.basicConfig(format="%(levelname)s: %(message)s")
58
63
  logger = logging.getLogger()
@@ -479,7 +484,7 @@ def main(
479
484
  exc = None
480
485
  except RuntimeError as e:
481
486
  # RuntimeError coming from pipgrip.pipper
482
- if "Failed to download/build wheel" not in str(e):
487
+ if REPORT_FAILURE_STR not in str(e) and BUILD_FAILURE_STR not in str(e):
483
488
  # only continue handling expected RuntimeErrors
484
489
  raise
485
490
  solution = solver.solution
@@ -241,9 +241,7 @@ class Version(VersionRange):
241
241
  if match is None:
242
242
  # VCS support: use numerical hash
243
243
  match = COMPLETE_VERSION.match(
244
- str(
245
- int(hashlib.sha256(text.encode("utf-8")).hexdigest(), 16) % 10**12
246
- )
244
+ str(int(hashlib.sha256(text.encode("utf-8")).hexdigest(), 16) % 10**12)
247
245
  )
248
246
 
249
247
  text = text.rstrip(".")
pipgrip/pipper.py CHANGED
@@ -49,6 +49,10 @@ from pipgrip.compat import PIP_VERSION, urlparse
49
49
 
50
50
  logger = logging.getLogger(__name__)
51
51
 
52
+ REPORT_FAILURE_STR = "Failed to get report for"
53
+ BUILD_FAILURE_STR = "Failed to download/build wheel for"
54
+ VERSIONS_FAILURE_STR = "Failed to get available versions for"
55
+
52
56
 
53
57
  def read_requirements(path):
54
58
  re_comments = re.compile(r"(?:^|\s+)#")
@@ -292,7 +296,7 @@ def _get_available_versions(package, index_url, extra_index_url, pre):
292
296
  ]
293
297
  _available_versions_cache[cache_key] = available_versions
294
298
  return available_versions
295
- raise RuntimeError("Failed to get available versions for {}".format(package))
299
+ raise RuntimeError("{} {}".format(VERSIONS_FAILURE_STR, package))
296
300
 
297
301
 
298
302
  def _get_package_report(
@@ -357,7 +361,7 @@ def _get_package_report(
357
361
  package, output.strip()
358
362
  )
359
363
  )
360
- raise RuntimeError("Failed to get report for {}".format(package))
364
+ raise RuntimeError("{} {}".format(REPORT_FAILURE_STR, package))
361
365
  else:
362
366
  with io.open(report_file, "r", encoding="utf-8") as fp:
363
367
  return json.load(fp)
@@ -397,7 +401,7 @@ def _download_wheel(
397
401
  package, output.strip()
398
402
  )
399
403
  )
400
- raise RuntimeError("Failed to download/build wheel for {}".format(package))
404
+ raise RuntimeError("{} {}".format(BUILD_FAILURE_STR, package))
401
405
  out = out.splitlines()[::-1]
402
406
  abs_wheel_dir_lower = abs_wheel_dir.lower()
403
407
  cwd_wheel_dir_lower = cwd_wheel_dir.lower()
@@ -456,11 +460,15 @@ def _download_wheel(
456
460
  # match on lowercase line for windows compatibility
457
461
  fname_len = len(
458
462
  line_lower.split(
459
- abs_wheel_dir_lower
460
- if abs_wheel_dir_lower in line_lower
461
- else cwd_wheel_dir_lower
462
- if cwd_wheel_dir_lower in line_lower
463
- else wheel_dir_lower,
463
+ (
464
+ abs_wheel_dir_lower
465
+ if abs_wheel_dir_lower in line_lower
466
+ else (
467
+ cwd_wheel_dir_lower
468
+ if cwd_wheel_dir_lower in line_lower
469
+ else wheel_dir_lower
470
+ )
471
+ ),
464
472
  1,
465
473
  )[1].split(".whl", 1)[0]
466
474
  + ".whl"
@@ -474,7 +482,7 @@ def _download_wheel(
474
482
  "\n".join(out[::-1])
475
483
  )
476
484
  )
477
- raise RuntimeError("Failed to download/build wheel for {}".format(package))
485
+ raise RuntimeError("{} {}".format(BUILD_FAILURE_STR, package))
478
486
 
479
487
 
480
488
  def _extract_metadata(wheel_fname):
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: pipgrip
3
- Version: 0.10.13
3
+ Version: 0.10.15
4
4
  Summary: Lightweight pip dependency resolver with deptree preview functionality based on the PubGrub algorithm
5
5
  Home-page: https://github.com/ddelange/pipgrip
6
6
  Author: ddelange
@@ -32,16 +32,28 @@ Classifier: Topic :: Utilities
32
32
  Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
33
33
  Description-Content-Type: text/markdown
34
34
  License-File: LICENSE
35
- Requires-Dist: anytree >=2.4.1
36
- Requires-Dist: click >=7
37
- Requires-Dist: packaging >=17
38
- Requires-Dist: setuptools >=38.3
35
+ Requires-Dist: anytree>=2.4.1
36
+ Requires-Dist: click>=7
37
+ Requires-Dist: packaging>=17
38
+ Requires-Dist: setuptools<81,>=38.3
39
39
  Requires-Dist: wheel
40
- Requires-Dist: pip >=7.1.0 ; python_version <= "3.6"
41
- Requires-Dist: pkginfo <1.8,>=1.4.2 ; python_version <= "3.6"
42
- Requires-Dist: enum34 ; python_version == "2.7"
43
- Requires-Dist: typing ; python_version == "2.7"
44
- Requires-Dist: pip >=22.2 ; python_version > "3.6"
40
+ Requires-Dist: pip>=22.2; python_version > "3.6"
41
+ Requires-Dist: pip>=7.1.0; python_version <= "3.6"
42
+ Requires-Dist: pkginfo<1.8,>=1.4.2; python_version <= "3.6"
43
+ Requires-Dist: enum34; python_version == "2.7"
44
+ Requires-Dist: typing; python_version == "2.7"
45
+ Dynamic: author
46
+ Dynamic: author-email
47
+ Dynamic: classifier
48
+ Dynamic: description
49
+ Dynamic: description-content-type
50
+ Dynamic: home-page
51
+ Dynamic: keywords
52
+ Dynamic: license
53
+ Dynamic: license-file
54
+ Dynamic: requires-dist
55
+ Dynamic: requires-python
56
+ Dynamic: summary
45
57
 
46
58
  # pipgrip
47
59
 
@@ -1,9 +1,9 @@
1
- pipgrip/__init__.py,sha256=6YqjHXolFat9MtA-9ExcwPegRzXoNaLzOrfzeSf1wAE,1801
2
- pipgrip/_repo_version.py,sha256=r7_FW3rhMwydF2AK17cVZsWPaAOeLhXGY6DFACctRGI,20
3
- pipgrip/cli.py,sha256=3m9odsk1aSZf4e_23iAOHnBGGj5DIUPktXa1DYd24ac,20213
1
+ pipgrip/__init__.py,sha256=eF4gP3t6HU78VGDzL3PdQUP6dt_aBGEXLl9Xge9dAu4,1924
2
+ pipgrip/_repo_version.py,sha256=KAIs8RKi7S1EDpqFhDeMfvDX8ScTPeEX-_RW3f9yvW0,20
3
+ pipgrip/cli.py,sha256=3yf-oOXh_p_U2YuAlSXOhNGBKISEc8j-Shl-H5vn1WM,20295
4
4
  pipgrip/compat.py,sha256=54TukmlLmNW_va39lA8QiQlfGohzbs0kPHTfa2nTRfE,1889
5
5
  pipgrip/package_source.py,sha256=hGGzNyjHDgvDZrUjEGhjilfjxllQa-wkj8ucPXnKfwg,10035
6
- pipgrip/pipper.py,sha256=GWHxjpLc5pnq5GSmwKljOK140d_JqBCz_VoXk_lvGEQ,19326
6
+ pipgrip/pipper.py,sha256=G_FvgYVEDeCq-qf-0-s5vAdzhR4fXQJnfJnooCpNyI8,19582
7
7
  pipgrip/libs/__init__.py,sha256=jRiQWapMFWoSuJpOLTJhawNWFz8RvT9BEMj9PzXawSg,1643
8
8
  pipgrip/libs/mixology/__init__.py,sha256=pl6xjPCGeWa6Cpv61qMn5LTCWOkl6rxGS-UjxiSuq54,1665
9
9
  pipgrip/libs/mixology/_compat.py,sha256=0Yzw_14A4bC89KjYeTG4F995J8le3g2GcqXFup9nM08,1772
@@ -25,13 +25,13 @@ pipgrip/libs/semver/__init__.py,sha256=y2cFXuivtECvaNGRkoMdAsrzJQaogclusSzim7NIN
25
25
  pipgrip/libs/semver/empty_constraint.py,sha256=saKESt4SiZNn6hW35ymKMW_sMc4v-YuK-ePYOFCuZl8,2224
26
26
  pipgrip/libs/semver/exceptions.py,sha256=TR6aSR_uVzRl_hVg3uFcWc88lhJarhAbuE__fD17V70,1689
27
27
  pipgrip/libs/semver/patterns.py,sha256=Y5Ufu5GXduyXVLT7pxIxCG21EMPPQEiCus9KujItEIk,2398
28
- pipgrip/libs/semver/version.py,sha256=mGpSKGs6rgbkH1QFDgC1X8ZcXpX8VnPpGUnhK4TGj3Q,14560
28
+ pipgrip/libs/semver/version.py,sha256=uNAkxpcQgWj047IJtZB9Fo_UlRFWCSAs8RxQ75ckTOA,14522
29
29
  pipgrip/libs/semver/version_constraint.py,sha256=nOFmEpOHCzpfqO1LFnXSqyZGGeN4mjLT228KYqh1qFY,2539
30
30
  pipgrip/libs/semver/version_range.py,sha256=NkmqYueJ_j8kxKd00BEykHFOWI39r31s38Csj8hu4-w,15350
31
31
  pipgrip/libs/semver/version_union.py,sha256=8ngwRmFKaOKmZ10M-ebyeRNB9uVl4HNL7FzoZYmOgDE,9801
32
- pipgrip-0.10.13.dist-info/LICENSE,sha256=ZoxfsQqxkYOcxTHFEye8YJRUUBAJISfdHej3Di7u_Bs,1587
33
- pipgrip-0.10.13.dist-info/METADATA,sha256=4sg5G4dVphSqYll4dWyXFQbj9uGI1knHn2H5pCC29DY,18090
34
- pipgrip-0.10.13.dist-info/WHEEL,sha256=DZajD4pwLWue70CAfc7YaxT1wLUciNBvN_TTcvXpltE,110
35
- pipgrip-0.10.13.dist-info/entry_points.txt,sha256=VGqby8sWTjfkK20Vj_FqBZ_UxBlgmAOzq4rcJLYlRq0,45
36
- pipgrip-0.10.13.dist-info/top_level.txt,sha256=upoyu3ujOmKRvBUtTrwzk58e-r6zJahuT_8-RDsd2p0,8
37
- pipgrip-0.10.13.dist-info/RECORD,,
32
+ pipgrip-0.10.15.dist-info/licenses/LICENSE,sha256=ZoxfsQqxkYOcxTHFEye8YJRUUBAJISfdHej3Di7u_Bs,1587
33
+ pipgrip-0.10.15.dist-info/METADATA,sha256=PLZg8ok114oGu2I0VbyOn0fFyXax1O1qha5wHw1SzeM,18336
34
+ pipgrip-0.10.15.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
35
+ pipgrip-0.10.15.dist-info/entry_points.txt,sha256=VGqby8sWTjfkK20Vj_FqBZ_UxBlgmAOzq4rcJLYlRq0,45
36
+ pipgrip-0.10.15.dist-info/top_level.txt,sha256=upoyu3ujOmKRvBUtTrwzk58e-r6zJahuT_8-RDsd2p0,8
37
+ pipgrip-0.10.15.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py2-none-any
5
5
  Tag: py3-none-any