pipgrip 0.10.14__py2.py3-none-any.whl → 0.11.0__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.14"
1
+ version = "0.11.0"
pipgrip/cli.py CHANGED
@@ -45,6 +45,8 @@ import click
45
45
  from anytree import AsciiStyle, ContStyle, Node, RenderTree
46
46
  from anytree.exporter import DictExporter
47
47
  from packaging.markers import default_environment
48
+ from packaging.requirements import InvalidRequirement
49
+ from pkg_resources import RequirementParseError
48
50
 
49
51
  from pipgrip import __version__
50
52
  from pipgrip.compat import PIP_VERSION
@@ -56,6 +58,7 @@ from pipgrip.pipper import (
56
58
  BUILD_FAILURE_STR,
57
59
  REPORT_FAILURE_STR,
58
60
  install_packages,
61
+ parse_req,
59
62
  read_requirements,
60
63
  )
61
64
 
@@ -383,6 +386,12 @@ def render_lock(packages, include_dot=True, sort=False):
383
386
  count=True,
384
387
  help="Control verbosity: -v will print cyclic dependencies (WARNING), -vv will show solving decisions (INFO), -vvv for development (DEBUG).",
385
388
  )
389
+ @click.option(
390
+ "--skip-invalid-input",
391
+ is_flag=True,
392
+ help="Skip invalid requirements (e.g. internal repositories, typos) and continue processing other dependencies.",
393
+ )
394
+ @click.version_option(version=__version__, prog_name="pipgrip")
386
395
  def main(
387
396
  dependencies,
388
397
  requirements_file,
@@ -406,6 +415,7 @@ def main(
406
415
  threads,
407
416
  pre,
408
417
  verbose,
418
+ skip_invalid_input,
409
419
  ):
410
420
  if verbose == 0:
411
421
  logger.setLevel(logging.ERROR)
@@ -476,7 +486,15 @@ def main(
476
486
  pre=pre,
477
487
  )
478
488
  for root_dependency in dependencies:
479
- source.root_dep(root_dependency)
489
+ try:
490
+ source.root_dep(root_dependency)
491
+ except (InvalidRequirement, RequirementParseError) as e:
492
+ if skip_invalid_input:
493
+ logger.warning(
494
+ "Skipping invalid requirement '%s': %s", root_dependency, str(e)
495
+ )
496
+ else:
497
+ raise
480
498
 
481
499
  solver = VersionSolver(source, threads=threads)
482
500
  try:
@@ -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
@@ -460,11 +460,15 @@ def _download_wheel(
460
460
  # match on lowercase line for windows compatibility
461
461
  fname_len = len(
462
462
  line_lower.split(
463
- abs_wheel_dir_lower
464
- if abs_wheel_dir_lower in line_lower
465
- else cwd_wheel_dir_lower
466
- if cwd_wheel_dir_lower in line_lower
467
- 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
+ ),
468
472
  1,
469
473
  )[1].split(".whl", 1)[0]
470
474
  + ".whl"
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: pipgrip
3
- Version: 0.10.14
3
+ Version: 0.11.0
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
@@ -35,13 +35,25 @@ License-File: LICENSE
35
35
  Requires-Dist: anytree>=2.4.1
36
36
  Requires-Dist: click>=7
37
37
  Requires-Dist: packaging>=17
38
- Requires-Dist: setuptools>=38.3
38
+ Requires-Dist: setuptools<81,>=38.3
39
39
  Requires-Dist: wheel
40
40
  Requires-Dist: pip>=22.2; python_version > "3.6"
41
41
  Requires-Dist: pip>=7.1.0; python_version <= "3.6"
42
42
  Requires-Dist: pkginfo<1.8,>=1.4.2; python_version <= "3.6"
43
43
  Requires-Dist: enum34; python_version == "2.7"
44
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
 
@@ -157,6 +169,10 @@ Options:
157
169
  -v, --verbose Control verbosity: -v will print cyclic
158
170
  dependencies (WARNING), -vv will show solving
159
171
  decisions (INFO), -vvv for development (DEBUG).
172
+ --skip-invalid-input Skip invalid requirements (e.g. internal
173
+ repositories, typos) and continue processing
174
+ other dependencies.
175
+ --version Show the version and exit.
160
176
  -h, --help Show this message and exit.
161
177
  ```
162
178
 
@@ -1,9 +1,9 @@
1
- pipgrip/__init__.py,sha256=6YqjHXolFat9MtA-9ExcwPegRzXoNaLzOrfzeSf1wAE,1801
2
- pipgrip/_repo_version.py,sha256=BIZlexLdfpZVpNaglF8-oT-ZlMA9bN6xDx1-nbTiYcI,20
3
- pipgrip/cli.py,sha256=3yf-oOXh_p_U2YuAlSXOhNGBKISEc8j-Shl-H5vn1WM,20295
1
+ pipgrip/__init__.py,sha256=eF4gP3t6HU78VGDzL3PdQUP6dt_aBGEXLl9Xge9dAu4,1924
2
+ pipgrip/_repo_version.py,sha256=dRrvxj3J72feH1jJTMOOTBdWRMp_uivh7mhwD2v-fMg,19
3
+ pipgrip/cli.py,sha256=fbDkH9-ja-8GoJIlWAh7EqZq3X5f11_gFSdyzO_Oyus,21005
4
4
  pipgrip/compat.py,sha256=54TukmlLmNW_va39lA8QiQlfGohzbs0kPHTfa2nTRfE,1889
5
5
  pipgrip/package_source.py,sha256=hGGzNyjHDgvDZrUjEGhjilfjxllQa-wkj8ucPXnKfwg,10035
6
- pipgrip/pipper.py,sha256=UvsdN9rWPyR12odXa8Ah3CH3QmfTmB-ISDXX7is-o4g,19454
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.14.dist-info/LICENSE,sha256=ZoxfsQqxkYOcxTHFEye8YJRUUBAJISfdHej3Di7u_Bs,1587
33
- pipgrip-0.10.14.dist-info/METADATA,sha256=ubW8QC7foeaHlqUv_GdKwCVMmTQu_1ijmNS24Ckll7k,18078
34
- pipgrip-0.10.14.dist-info/WHEEL,sha256=pxeNX5JdtCe58PUSYP9upmc7jdRPgvT0Gm9kb1SHlVw,109
35
- pipgrip-0.10.14.dist-info/entry_points.txt,sha256=VGqby8sWTjfkK20Vj_FqBZ_UxBlgmAOzq4rcJLYlRq0,45
36
- pipgrip-0.10.14.dist-info/top_level.txt,sha256=upoyu3ujOmKRvBUtTrwzk58e-r6zJahuT_8-RDsd2p0,8
37
- pipgrip-0.10.14.dist-info/RECORD,,
32
+ pipgrip-0.11.0.dist-info/licenses/LICENSE,sha256=ZoxfsQqxkYOcxTHFEye8YJRUUBAJISfdHej3Di7u_Bs,1587
33
+ pipgrip-0.11.0.dist-info/METADATA,sha256=aza8VPqH9MtyNMUmC2tUyUo0NRKXa24o_t-rsflw-ek,18596
34
+ pipgrip-0.11.0.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
35
+ pipgrip-0.11.0.dist-info/entry_points.txt,sha256=VGqby8sWTjfkK20Vj_FqBZ_UxBlgmAOzq4rcJLYlRq0,45
36
+ pipgrip-0.11.0.dist-info/top_level.txt,sha256=upoyu3ujOmKRvBUtTrwzk58e-r6zJahuT_8-RDsd2p0,8
37
+ pipgrip-0.11.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.6.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