scanoss 1.13.0__py3-none-any.whl → 1.14.0__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.
scanoss/__init__.py CHANGED
@@ -22,4 +22,4 @@
22
22
  THE SOFTWARE.
23
23
  """
24
24
 
25
- __version__ = '1.13.0'
25
+ __version__ = '1.14.0'
@@ -1 +1 @@
1
- date: 20240605132032, utime: 1717593632
1
+ date: 20240829161941, utime: 1724948381
scanoss/scanner.py CHANGED
@@ -25,7 +25,7 @@ import json
25
25
  import os
26
26
  import sys
27
27
  import datetime
28
- import pkg_resources
28
+ import importlib_resources
29
29
 
30
30
  from progress.bar import Bar
31
31
  from progress.spinner import Spinner
@@ -270,9 +270,10 @@ class Scanner(ScanossBase):
270
270
  """
271
271
  data = None
272
272
  try:
273
- f_name = pkg_resources.resource_filename(__name__, 'data/build_date.txt')
274
- with open(f_name, 'r') as f:
275
- data = f.read().rstrip()
273
+ f_name = importlib_resources.files(__name__) / 'data/build_date.txt'
274
+ with importlib_resources.as_file(f_name) as f:
275
+ with open(f, 'r', encoding='utf-8') as file:
276
+ data = file.read().rstrip()
276
277
  except Exception as e:
277
278
  Scanner.print_stderr(f'Warning: Problem loading build time details: {e}')
278
279
  if not data or len(data) == 0:
scanoss/spdxlite.py CHANGED
@@ -28,7 +28,7 @@ import hashlib
28
28
  import datetime
29
29
  import getpass
30
30
  import re
31
- import pkg_resources
31
+ import importlib_resources
32
32
 
33
33
  from . import __version__
34
34
 
@@ -300,9 +300,10 @@ class SpdxLite:
300
300
  :return: True if successful, False otherwise
301
301
  """
302
302
  try:
303
- f_name = pkg_resources.resource_filename(__name__, filename)
304
- with open(f_name, 'r') as f:
305
- data = json.loads(f.read())
303
+ f_name = importlib_resources.files(__name__) / filename
304
+ with importlib_resources.as_file(f_name) as f:
305
+ with open(f, 'r', encoding='utf-8') as file:
306
+ data = json.load(file)
306
307
  except Exception as e:
307
308
  self.print_stderr(f'ERROR: Problem parsing SPDX license input JSON: {e}')
308
309
  return False
scanoss/winnowing.py CHANGED
@@ -307,7 +307,7 @@ class Winnowing(ScanossBase):
307
307
  return ''
308
308
  # Print file line
309
309
  content_length = len(contents)
310
- wfp_filename = file
310
+ wfp_filename = repr(file).strip("'") # return a utf-8 compatible version of the filename
311
311
  if self.obfuscate: # hide the real size of the file and its name, but keep the suffix
312
312
  wfp_filename = f'{self.ob_count}{pathlib.Path(file).suffix}'
313
313
  self.ob_count = self.ob_count + 1
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: scanoss
3
- Version: 1.13.0
3
+ Version: 1.14.0
4
4
  Summary: Simple Python library to leverage the SCANOSS APIs
5
5
  Home-page: https://scanoss.com
6
6
  Author: SCANOSS
@@ -17,16 +17,17 @@ Requires-Python: >=3.7
17
17
  Description-Content-Type: text/markdown
18
18
  License-File: LICENSE
19
19
  Requires-Dist: requests
20
- Requires-Dist: crc32c >=2.2
20
+ Requires-Dist: crc32c>=2.2
21
21
  Requires-Dist: binaryornot
22
22
  Requires-Dist: progress
23
- Requires-Dist: grpcio >1.42.0
24
- Requires-Dist: protobuf >3.19.1
23
+ Requires-Dist: grpcio>1.42.0
24
+ Requires-Dist: protobuf>3.19.1
25
25
  Requires-Dist: pypac
26
26
  Requires-Dist: pyOpenSSL
27
27
  Requires-Dist: google-api-core
28
+ Requires-Dist: importlib-resources
28
29
  Provides-Extra: fast_winnowing
29
- Requires-Dist: scanoss-winnowing >=0.5.0 ; extra == 'fast_winnowing'
30
+ Requires-Dist: scanoss-winnowing>=0.5.0; extra == "fast-winnowing"
30
31
 
31
32
  # SCANOSS Python Package
32
33
  The SCANOSS python package provides a simple easy to consume library for interacting with SCANOSS APIs/Engine.
@@ -4,22 +4,22 @@ protoc_gen_swagger/options/annotations_pb2.py,sha256=b25EDD6gssUWnFby9gxgcpLIROT
4
4
  protoc_gen_swagger/options/annotations_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
5
5
  protoc_gen_swagger/options/openapiv2_pb2.py,sha256=vYElGp8E1vGHszvWqX97zNG9GFJ7u2QcdK9ouq0XdyI,14939
6
6
  protoc_gen_swagger/options/openapiv2_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
7
- scanoss/__init__.py,sha256=u1SpkxVGNwD-IXesiouaSu8W-ItPFNjvBWNM6EbBYd0,1163
7
+ scanoss/__init__.py,sha256=PYRQO5k_j5mM7XuvgMnHH8E6yu_q0uICKeUgA6to0Mk,1163
8
8
  scanoss/cli.py,sha256=rsLtipYmDjAQxEIKwQuf9Y5XAcl0p5hZs6ZQ_TcJ-eA,42812
9
9
  scanoss/components.py,sha256=ZHZ1KA69shxOASZK7USD9yPTITpAc_RXL5q5zpDK23o,12590
10
10
  scanoss/csvoutput.py,sha256=hBwr_Fc6mBdOdXgyQcdFrockYH-PJ0jblowlExJ6OPg,9925
11
11
  scanoss/cyclonedx.py,sha256=G6HxI8z3NJsOjBRuQJ8ApHQaUOP9-lO8PIBjcJMHchg,12167
12
12
  scanoss/filecount.py,sha256=o7xb6m387ucnsU4H1OXGzf_AdWsudhAHe49T8uX4Ieo,6660
13
13
  scanoss/scancodedeps.py,sha256=dPJsv9BmEsaM1IEzceJCnwLyu6Z0JwPposxdY4q0DAg,10775
14
- scanoss/scanner.py,sha256=Gyq40tbFW69IgWVAcTmKKn6FgTMMMs7Eh1KBKpQAZwY,51123
14
+ scanoss/scanner.py,sha256=VqLjJh7igR59gTA0jFHvueS6hh8JSs3QgEK7rzPuBbA,51210
15
15
  scanoss/scanossapi.py,sha256=5OwRQZ23rdPOL4bA5fXI7xdKnJOgRYaL60HuzZPdu-I,12562
16
16
  scanoss/scanossbase.py,sha256=WxYlWl6WxRArho4VKGFxEla8qYnjOXtF6EnwsHTrKm4,2319
17
17
  scanoss/scanossgrpc.py,sha256=ythZkr6F0P0hl_KPYoHkos_IL97TxLKeYfAouX_CUnM,20491
18
18
  scanoss/scantype.py,sha256=R2-ExLGOrYxaJFtIK2AEo2caD0XrN1zpF5q1qT9Zsyc,1326
19
- scanoss/spdxlite.py,sha256=poLtzD2eaSL5X7adYbH3blxKAFO8Asf_1nIZj3ewXCA,15559
19
+ scanoss/spdxlite.py,sha256=IsWP9o1D8ryT1_5LeobIEhWJXNFbffoWCy1yaeZY2X0,15638
20
20
  scanoss/threadeddependencies.py,sha256=JotQC9X3nnviblKe--OPS-7rr1W-cZjuxsxSPL-tbPg,6284
21
21
  scanoss/threadedscanning.py,sha256=T0tL8W1IEX_hLY5ksrAl_iQqtxT_KbyDhTDHo6a7xFE,9387
22
- scanoss/winnowing.py,sha256=lGRTtm5QqLQiu6PUV2lF5qI82g43OKyJ8-QsOV9Xp7w,18664
22
+ scanoss/winnowing.py,sha256=HzMWRYh1XB4so71br-DUPpV6OlmymDfsnU-EOCCObJM,18734
23
23
  scanoss/api/__init__.py,sha256=KlDD87JmyZP-10T-fuJo0_v2zt1gxWfTgs70wjky9xg,1139
24
24
  scanoss/api/common/__init__.py,sha256=KlDD87JmyZP-10T-fuJo0_v2zt1gxWfTgs70wjky9xg,1139
25
25
  scanoss/api/common/v2/__init__.py,sha256=KlDD87JmyZP-10T-fuJo0_v2zt1gxWfTgs70wjky9xg,1139
@@ -47,12 +47,12 @@ scanoss/api/vulnerabilities/__init__.py,sha256=FLQtiDiv85Q1Chk-sJ9ky9WOV1mulZhEK
47
47
  scanoss/api/vulnerabilities/v2/__init__.py,sha256=FLQtiDiv85Q1Chk-sJ9ky9WOV1mulZhEKjiBihlwiaM,1139
48
48
  scanoss/api/vulnerabilities/v2/scanoss_vulnerabilities_pb2.py,sha256=CFhF80av8tenGvn9AIsGEtRJPuV2dC_syA5JLZb2lDw,5464
49
49
  scanoss/api/vulnerabilities/v2/scanoss_vulnerabilities_pb2_grpc.py,sha256=HlS4k4Zmx6RIAqaO9I96jD-eyF5yU6Xx04pVm7pdqOg,6864
50
- scanoss/data/build_date.txt,sha256=zD6AS2I72efNahM0-wXO-pr1RZFb654-eb5k92d1LS4,40
50
+ scanoss/data/build_date.txt,sha256=8feY4PDqu0ixPx9lW8xrv7zGbeOE1zZpaCtdJgPoVKc,40
51
51
  scanoss/data/spdx-exceptions.json,sha256=s7UTYxC7jqQXr11YBlIWYCNwN6lRDFTR33Y8rpN_dA4,17953
52
52
  scanoss/data/spdx-licenses.json,sha256=A6Z0q82gaTLtnopBfzeIVZjJFxkdRW1g2TuumQc-lII,228794
53
- scanoss-1.13.0.dist-info/LICENSE,sha256=LLUaXoiyOroIbr5ubAyrxBOwSRLTm35ETO2FmLpy8QQ,1074
54
- scanoss-1.13.0.dist-info/METADATA,sha256=Ot8w1hKTSO-pJ_mX-XuuXz3MNgMFmOUjLdyKV_3ST1A,5906
55
- scanoss-1.13.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
56
- scanoss-1.13.0.dist-info/entry_points.txt,sha256=Uy28xnaDL5KQ7V77sZD5VLDXPNxYYzSr5tsqtiXVzAs,48
57
- scanoss-1.13.0.dist-info/top_level.txt,sha256=V11PrQ6Pnrc-nDF9xnisnJ8e6-i7HqSIKVNqduRWcL8,27
58
- scanoss-1.13.0.dist-info/RECORD,,
53
+ scanoss-1.14.0.dist-info/LICENSE,sha256=LLUaXoiyOroIbr5ubAyrxBOwSRLTm35ETO2FmLpy8QQ,1074
54
+ scanoss-1.14.0.dist-info/METADATA,sha256=QjOh1Fz4JLUKb3Za39rv9XAy_Z4vbx84gQKp9EQhuP8,5936
55
+ scanoss-1.14.0.dist-info/WHEEL,sha256=UvcQYKBHoFqaQd6LKyqHw9fxEolWLQnlzP0h_LgJAfI,91
56
+ scanoss-1.14.0.dist-info/entry_points.txt,sha256=Uy28xnaDL5KQ7V77sZD5VLDXPNxYYzSr5tsqtiXVzAs,48
57
+ scanoss-1.14.0.dist-info/top_level.txt,sha256=V11PrQ6Pnrc-nDF9xnisnJ8e6-i7HqSIKVNqduRWcL8,27
58
+ scanoss-1.14.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: setuptools (74.0.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5