ossa-scanner 0.1.0__tar.gz → 0.1.2__tar.gz

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.
Files changed (31) hide show
  1. ossa_scanner-0.1.2/PKG-INFO +28 -0
  2. ossa_scanner-0.1.2/ossa_scanner/__init__.py +1 -0
  3. ossa_scanner-0.1.2/ossa_scanner/cli.py +35 -0
  4. {ossa_scanner-0.1.0 → ossa_scanner-0.1.2}/ossa_scanner/scanner.py +6 -13
  5. ossa_scanner-0.1.2/ossa_scanner/utils/downloader.py +47 -0
  6. ossa_scanner-0.1.2/ossa_scanner/utils/os_detection.py +13 -0
  7. ossa_scanner-0.1.2/ossa_scanner/utils/package_manager.py +128 -0
  8. ossa_scanner-0.1.2/ossa_scanner/utils/swhid_calculator.py +3 -0
  9. ossa_scanner-0.1.2/ossa_scanner.egg-info/PKG-INFO +28 -0
  10. {ossa_scanner-0.1.0 → ossa_scanner-0.1.2}/ossa_scanner.egg-info/SOURCES.txt +3 -2
  11. ossa_scanner-0.1.2/ossa_scanner.egg-info/entry_points.txt +2 -0
  12. ossa_scanner-0.1.2/ossa_scanner.egg-info/requires.txt +3 -0
  13. ossa_scanner-0.1.2/setup.cfg +4 -0
  14. ossa_scanner-0.1.2/setup.py +55 -0
  15. ossa_scanner-0.1.0/PKG-INFO +0 -41
  16. ossa_scanner-0.1.0/ossa_scanner/utils/__init__.py +0 -0
  17. ossa_scanner-0.1.0/ossa_scanner/utils/downloader.py +0 -11
  18. ossa_scanner-0.1.0/ossa_scanner/utils/os_detection.py +0 -10
  19. ossa_scanner-0.1.0/ossa_scanner/utils/package_manager.py +0 -31
  20. ossa_scanner-0.1.0/ossa_scanner/utils/swhid_calculator.py +0 -4
  21. ossa_scanner-0.1.0/ossa_scanner.egg-info/PKG-INFO +0 -41
  22. ossa_scanner-0.1.0/ossa_scanner.egg-info/requires.txt +0 -1
  23. ossa_scanner-0.1.0/pyproject.toml +0 -28
  24. ossa_scanner-0.1.0/setup.cfg +0 -31
  25. {ossa_scanner-0.1.0 → ossa_scanner-0.1.2}/LICENSE +0 -0
  26. {ossa_scanner-0.1.0 → ossa_scanner-0.1.2}/README.md +0 -0
  27. {ossa_scanner-0.1.0 → ossa_scanner-0.1.2}/ossa_scanner/uploader.py +0 -0
  28. {ossa_scanner-0.1.0/ossa_scanner → ossa_scanner-0.1.2/ossa_scanner/utils}/__init__.py +0 -0
  29. {ossa_scanner-0.1.0 → ossa_scanner-0.1.2}/ossa_scanner/utils/hash_calculator.py +0 -0
  30. {ossa_scanner-0.1.0 → ossa_scanner-0.1.2}/ossa_scanner.egg-info/dependency_links.txt +0 -0
  31. {ossa_scanner-0.1.0 → ossa_scanner-0.1.2}/ossa_scanner.egg-info/top_level.txt +0 -0
@@ -0,0 +1,28 @@
1
+ Metadata-Version: 2.1
2
+ Name: ossa_scanner
3
+ Version: 0.1.2
4
+ Summary: A Python library for scanning Linux packages, managing metadata, and generating SWHIDs.
5
+ Home-page: https://github.com/oscarvalenzuelab/ossa_scanner
6
+ Author: Oscar Valenzuela
7
+ Author-email: oscar.valenzuela.b@gmail.com
8
+ License: MIT
9
+ Keywords: linux packages SWHID open-source compliance
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.6
15
+ Classifier: Programming Language :: Python :: 3.7
16
+ Classifier: Programming Language :: Python :: 3.8
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Operating System :: POSIX :: Linux
20
+ Requires-Python: >=3.6
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: click
24
+ Requires-Dist: swh.model
25
+ Requires-Dist: distro
26
+
27
+ # ossa_scanner
28
+ Open Source Advisory Scanner (Generator)
@@ -0,0 +1 @@
1
+ __version__ = "0.1.2"
@@ -0,0 +1,35 @@
1
+ import argparse
2
+ from .scanner import Scanner
3
+ from .uploader import GitHubUploader
4
+
5
+ def main():
6
+ parser = argparse.ArgumentParser(description="OSSA Scanner CLI Tool")
7
+ parser.add_argument('--output-dir', type=str, required=True, help="Directory to save downloaded source")
8
+ parser.add_argument('--results-file', type=str, required=True, help="Path to save the JSON results")
9
+ parser.add_argument('--threads', type=int, default=4, help="Number of threads for parallel processing")
10
+ parser.add_argument('--upload', action='store_true', help="Upload results to GitHub")
11
+ parser.add_argument('--repo-owner', type=str, help="GitHub repository owner")
12
+ parser.add_argument('--repo-name', type=str, help="GitHub repository name")
13
+ parser.add_argument('--token', type=str, help="GitHub token")
14
+ parser.add_argument('--repo-dir', type=str, help="Target directory in GitHub repo for results")
15
+ args = parser.parse_args()
16
+
17
+ # Initialize the scanner
18
+ scanner = Scanner(output_dir=args.output_dir, threads=args.threads)
19
+
20
+ # Perform scanning
21
+ results = scanner.scan_packages()
22
+
23
+ # Save results locally
24
+ scanner.save_results(results, args.results_file)
25
+
26
+ # Upload results to GitHub if specified
27
+ if args.upload:
28
+ if not (args.repo_owner and args.repo_name and args.token and args.repo_dir):
29
+ raise ValueError("GitHub upload requires --repo-owner, --repo-name, --token, and --repo-dir")
30
+
31
+ uploader = GitHubUploader(args.token, args.repo_owner, args.repo_name)
32
+ scanner.upload_results(args.results_file, uploader, args.repo_dir)
33
+
34
+ if __name__ == "__main__":
35
+ main()
@@ -1,21 +1,15 @@
1
1
  import os
2
2
  import json
3
3
  from concurrent.futures import ThreadPoolExecutor, as_completed
4
- from ossa_scanner.utils.os_detection import detect_os
5
- from ossa_scanner.utils.package_manager import list_packages, get_package_info, download_source
6
- from ossa_scanner.utils.hash_calculator import calculate_file_hash
7
- from ossa_scanner.utils.swhid_calculator import calculate_swhid
8
- from ossa_scanner.uploader import GitHubUploader
4
+ from .utils.os_detection import detect_os
5
+ from .utils.package_manager import list_packages, get_package_info
6
+ from .utils.downloader import download_source
7
+ from .utils.hash_calculator import calculate_file_hash
8
+ from .utils.swhid_calculator import calculate_swhid
9
+ from .uploader import GitHubUploader
9
10
 
10
11
  class Scanner:
11
12
  def __init__(self, output_dir, threads=4):
12
- """
13
- Initialize the scanner with the output directory and thread count.
14
-
15
- Args:
16
- output_dir (str): Directory to store downloaded files and extracted sources.
17
- threads (int): Number of threads for parallel processing.
18
- """
19
13
  self.output_dir = output_dir
20
14
  self.os_type = detect_os()
21
15
  self.threads = threads
@@ -75,7 +69,6 @@ class Scanner:
75
69
  print(f"Detected OS: {self.os_type}")
76
70
  print("Listing available packages...")
77
71
  packages = list_packages(self.os_type)
78
-
79
72
  results = []
80
73
  with ThreadPoolExecutor(max_workers=self.threads) as executor:
81
74
  # Submit tasks for parallel processing
@@ -0,0 +1,47 @@
1
+ import subprocess
2
+ import os
3
+ import shutil
4
+ import glob
5
+
6
+ def download_source(package_manager, package_name, output_dir):
7
+ try:
8
+ if package_manager == 'apt':
9
+ cmd = ['apt-get', 'source', package_name, '-d', output_dir]
10
+ subprocess.run(cmd, check=True)
11
+ elif package_manager in ['yum', 'dnf']:
12
+ cmd = ['dnf', 'download', '--source', package_name, '--downloaddir', output_dir]
13
+ subprocess.run(cmd, check=True)
14
+ elif package_manager == 'brew':
15
+ # Fetch the source tarball
16
+ cmd = ['brew', 'fetch', '--build-from-source', package_name]
17
+ subprocess.run(cmd, check=True, capture_output=True, text=True)
18
+ cache_dir = subprocess.run(
19
+ ['brew', '--cache', package_name],
20
+ capture_output=True,
21
+ text=True,
22
+ check=True
23
+ ).stdout.strip()
24
+ prefixes_to_remove = ['aarch64-elf-', 'arm-none-eabi-', 'other-prefix-']
25
+ stripped_package_name = package_name
26
+ for prefix in prefixes_to_remove:
27
+ if package_name.startswith(prefix):
28
+ stripped_package_name = package_name[len(prefix):]
29
+ break
30
+ cache_folder = os.path.dirname(cache_dir)
31
+ tarball_pattern = os.path.join(cache_folder, f"*{stripped_package_name}*")
32
+ matching_files = glob.glob(tarball_pattern)
33
+ if not matching_files:
34
+ raise FileNotFoundError(f"Tarball not found for {package_name} in {cache_folder}")
35
+ tarball_path = matching_files[0]
36
+ os.makedirs(output_dir, exist_ok=True)
37
+ target_path = os.path.join(output_dir, os.path.basename(tarball_path))
38
+ shutil.move(tarball_path, target_path)
39
+ return target_path
40
+ else:
41
+ raise ValueError("Unsupported package manager")
42
+ except subprocess.CalledProcessError as e:
43
+ print(f"Command failed: {e}")
44
+ return None
45
+ except Exception as e:
46
+ print(f"Error: {e}")
47
+ return None
@@ -0,0 +1,13 @@
1
+ import distro
2
+
3
+ def detect_os():
4
+ dist = distro.id()
5
+ if 'ubuntu' in dist or 'debian' in dist:
6
+ return 'apt'
7
+ elif 'redhat' in dist or 'centos' in dist or 'almalinux' in dist:
8
+ return 'yum'
9
+ elif 'darwin' in dist:
10
+ return 'brew'
11
+ else:
12
+ raise ValueError("Unsupported OS")
13
+
@@ -0,0 +1,128 @@
1
+ import subprocess
2
+
3
+
4
+ def list_packages(package_manager):
5
+ if package_manager == 'apt':
6
+ result = subprocess.run(
7
+ ['apt-cache', 'search', '.'],
8
+ capture_output=True,
9
+ text=True
10
+ )
11
+ elif package_manager in ['yum', 'dnf']:
12
+ result = subprocess.run(
13
+ ['repoquery', '--all'],
14
+ capture_output=True,
15
+ text=True
16
+ )
17
+ elif package_manager == 'brew':
18
+ result = subprocess.run(
19
+ ['brew', 'search', '.'],
20
+ capture_output=True,
21
+ text=True
22
+ )
23
+ else:
24
+ raise ValueError("ER1: Unsupported package manager for search")
25
+
26
+ packages = result.stdout.splitlines()
27
+ extracted_packages = []
28
+ max_packages = 5
29
+ k_packages = 0
30
+ for line in packages:
31
+ if not line.strip() or line.startswith("==>"):
32
+ continue
33
+ extracted_packages.append(line.split()[0])
34
+ if k_packages >= max_packages:
35
+ break
36
+ k_packages += 1
37
+
38
+ return extracted_packages
39
+
40
+
41
+ def get_package_info(package_manager, package_name):
42
+ if package_manager == 'apt':
43
+ cmd = ['apt-cache', 'show', package_name]
44
+ elif package_manager in ['yum', 'dnf']:
45
+ cmd = ['repoquery', '--info', package_name]
46
+ elif package_manager == 'brew':
47
+ cmd = ['brew', 'info', package_name]
48
+ else:
49
+ raise ValueError("ER: Unsupported package manager for info")
50
+
51
+ try:
52
+ result = subprocess.run(cmd, capture_output=True, text=True, check=True)
53
+ output = result.stdout
54
+
55
+ # Parse the output based on the package manager
56
+ if package_manager == 'brew':
57
+ return parse_brew_info(output)
58
+ elif package_manager in ['yum', 'dnf']:
59
+ return parse_yum_info(output)
60
+ elif package_manager == 'apt':
61
+ return parse_apt_info(output)
62
+ except subprocess.CalledProcessError as e:
63
+ print(f"Command failed: {e}")
64
+ return None
65
+
66
+
67
+ def parse_brew_info(output):
68
+ """Parses brew info output to extract license, website, and description."""
69
+ info = {}
70
+ lines = output.splitlines()
71
+ info["license"] = "Unknown"
72
+ info["website"] = "Unknown"
73
+ info["description"] = "Unknown"
74
+
75
+ for i, line in enumerate(lines):
76
+ if i == 1: # The description is usually on the second line
77
+ info["description"] = line.strip()
78
+ elif line.startswith("https://"): # The website URL
79
+ info["website"] = line.strip()
80
+ elif line.startswith("License:"): # The license information
81
+ info["license"] = line.split(":", 1)[1].strip()
82
+
83
+ # Ensure all keys are present even if some fields are missing
84
+ return info
85
+
86
+
87
+
88
+ def parse_yum_info(output):
89
+ """Parses yum repoquery --info output."""
90
+ info = {}
91
+ lines = output.splitlines()
92
+
93
+ for line in lines:
94
+ if line.startswith("License"):
95
+ info["license"] = line.split(":", 1)[1].strip()
96
+ elif line.startswith("URL"):
97
+ info["website"] = line.split(":", 1)[1].strip()
98
+ elif "Copyright" in line:
99
+ info["copyright"] = line.strip()
100
+
101
+ # Ensure all keys are present even if data is missing
102
+ return {
103
+ "license": info.get("license", "Unknown"),
104
+ "copyright": info.get("copyright", "Unknown"),
105
+ "website": info.get("website", "Unknown"),
106
+ }
107
+
108
+
109
+ def parse_apt_info(output):
110
+ """Parses apt-cache show output."""
111
+ info = {}
112
+ lines = output.splitlines()
113
+
114
+ for line in lines:
115
+ if line.startswith("License:") or "License" in line:
116
+ info["license"] = line.split(":", 1)[1].strip()
117
+ elif line.startswith("Homepage:"):
118
+ info["website"] = line.split(":", 1)[1].strip()
119
+ elif "Copyright" in line:
120
+ info["copyright"] = line.strip()
121
+
122
+ # Ensure all keys are present even if data is missing
123
+ return {
124
+ "license": info.get("license", "Unknown"),
125
+ "copyright": info.get("copyright", "Unknown"),
126
+ "website": info.get("website", "Unknown"),
127
+ }
128
+
@@ -0,0 +1,3 @@
1
+
2
+ def calculate_swhid(directory_path):
3
+ return directory_path
@@ -0,0 +1,28 @@
1
+ Metadata-Version: 2.1
2
+ Name: ossa_scanner
3
+ Version: 0.1.2
4
+ Summary: A Python library for scanning Linux packages, managing metadata, and generating SWHIDs.
5
+ Home-page: https://github.com/oscarvalenzuelab/ossa_scanner
6
+ Author: Oscar Valenzuela
7
+ Author-email: oscar.valenzuela.b@gmail.com
8
+ License: MIT
9
+ Keywords: linux packages SWHID open-source compliance
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.6
15
+ Classifier: Programming Language :: Python :: 3.7
16
+ Classifier: Programming Language :: Python :: 3.8
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Operating System :: POSIX :: Linux
20
+ Requires-Python: >=3.6
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: click
24
+ Requires-Dist: swh.model
25
+ Requires-Dist: distro
26
+
27
+ # ossa_scanner
28
+ Open Source Advisory Scanner (Generator)
@@ -1,13 +1,14 @@
1
1
  LICENSE
2
2
  README.md
3
- pyproject.toml
4
- setup.cfg
3
+ setup.py
5
4
  ossa_scanner/__init__.py
5
+ ossa_scanner/cli.py
6
6
  ossa_scanner/scanner.py
7
7
  ossa_scanner/uploader.py
8
8
  ossa_scanner.egg-info/PKG-INFO
9
9
  ossa_scanner.egg-info/SOURCES.txt
10
10
  ossa_scanner.egg-info/dependency_links.txt
11
+ ossa_scanner.egg-info/entry_points.txt
11
12
  ossa_scanner.egg-info/requires.txt
12
13
  ossa_scanner.egg-info/top_level.txt
13
14
  ossa_scanner/utils/__init__.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ ossa_scanner = ossa_scanner.cli:main
@@ -0,0 +1,3 @@
1
+ click
2
+ swh.model
3
+ distro
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,55 @@
1
+ from setuptools import setup, find_packages
2
+ import os
3
+
4
+ def get_version():
5
+ """
6
+ Extract the version from __init__.py.
7
+ """
8
+ version_file = os.path.join(os.path.dirname(__file__), "ossa_scanner", "__init__.py")
9
+ with open(version_file, "r") as f:
10
+ for line in f:
11
+ if line.startswith("__version__"):
12
+ delim = '"' if '"' in line else "'"
13
+ return line.split(delim)[1]
14
+ raise RuntimeError("Version not found in __init__.py")
15
+
16
+ # Read the README file for the long description
17
+ with open("README.md", "r", encoding="utf-8") as fh:
18
+ long_description = fh.read()
19
+
20
+ setup(
21
+ name="ossa_scanner",
22
+ version=get_version(),
23
+ description="A Python library for scanning Linux packages, managing metadata, and generating SWHIDs.",
24
+ long_description=long_description,
25
+ long_description_content_type='text/markdown',
26
+ author="Oscar Valenzuela",
27
+ author_email="oscar.valenzuela.b@gmail.com",
28
+ license='MIT',
29
+ url='https://github.com/oscarvalenzuelab/ossa_scanner',
30
+ packages=find_packages(),
31
+ install_requires=[
32
+ "click",
33
+ "swh.model",
34
+ "distro",
35
+ ],
36
+ entry_points={
37
+ "console_scripts": [
38
+ "ossa_scanner=ossa_scanner.cli:main",
39
+ ],
40
+ },
41
+ python_requires='>=3.6',
42
+ classifiers=[
43
+ "Development Status :: 3 - Alpha",
44
+ "Intended Audience :: Developers",
45
+ "License :: OSI Approved :: MIT License",
46
+ "Programming Language :: Python :: 3",
47
+ "Programming Language :: Python :: 3.6",
48
+ "Programming Language :: Python :: 3.7",
49
+ "Programming Language :: Python :: 3.8",
50
+ "Programming Language :: Python :: 3.9",
51
+ "Programming Language :: Python :: 3.10",
52
+ "Operating System :: POSIX :: Linux",
53
+ ],
54
+ keywords="linux packages SWHID open-source compliance",
55
+ )
@@ -1,41 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: ossa-scanner
3
- Version: 0.1.0
4
- Summary: A CLI tool to scan Linux packages, manage metadata, and upload results to GitHub.
5
- Author: Oscar Valenzuela
6
- Author-email: Oscar Valenzuela <oscar.valenzuela.b@gmail.com>
7
- License: MIT License
8
-
9
- Copyright (c) 2024 Oscar V
10
-
11
- Permission is hereby granted, free of charge, to any person obtaining a copy
12
- of this software and associated documentation files (the "Software"), to deal
13
- in the Software without restriction, including without limitation the rights
14
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
- copies of the Software, and to permit persons to whom the Software is
16
- furnished to do so, subject to the following conditions:
17
-
18
- The above copyright notice and this permission notice shall be included in all
19
- copies or substantial portions of the Software.
20
-
21
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
- SOFTWARE.
28
-
29
- Keywords: linux,packages,SWHID,GitHub,open-source
30
- Classifier: Development Status :: 3 - Alpha
31
- Classifier: Intended Audience :: Developers
32
- Classifier: License :: OSI Approved :: MIT License
33
- Classifier: Programming Language :: Python :: 3
34
- Classifier: Operating System :: POSIX :: Linux
35
- Requires-Python: >=3.7
36
- Description-Content-Type: text/markdown
37
- License-File: LICENSE
38
- Requires-Dist: swh.model
39
-
40
- # ossa_scanner
41
- Open Source Advisory Scanner (Generator)
File without changes
@@ -1,11 +0,0 @@
1
- import subprocess
2
-
3
- def download_source(package_manager, package_name, output_dir):
4
- if package_manager == 'apt':
5
- cmd = ['apt-get', 'source', package_name, '-d', output_dir]
6
- elif package_manager in ['yum', 'dnf']:
7
- cmd = ['dnf', 'download', '--source', package_name, '--downloaddir', output_dir]
8
- else:
9
- raise ValueError("Unsupported package manager")
10
-
11
- subprocess.run(cmd)
@@ -1,10 +0,0 @@
1
- import platform
2
-
3
- def detect_os():
4
- dist, _, _ = platform.linux_distribution(full_distribution_name=False)
5
- if 'Ubuntu' in dist or 'Debian' in dist:
6
- return 'apt'
7
- elif 'Red Hat' in dist or 'CentOS' in dist or 'AlmaLinux' in dist:
8
- return 'yum'
9
- else:
10
- raise ValueError("Unsupported OS")
@@ -1,31 +0,0 @@
1
- import subprocess
2
-
3
- def list_packages(package_manager):
4
- if package_manager == 'apt':
5
- result = subprocess.run(
6
- ['apt-cache', 'search', '.'],
7
- capture_output=True,
8
- text=True
9
- )
10
- elif package_manager in ['yum', 'dnf']:
11
- result = subprocess.run(
12
- ['repoquery', '--all'],
13
- capture_output=True,
14
- text=True
15
- )
16
- else:
17
- raise ValueError("Unsupported package manager")
18
-
19
- packages = result.stdout.splitlines()
20
- return [pkg.split()[0] for pkg in packages]
21
-
22
- def get_package_info(package_manager, package_name):
23
- if package_manager == 'apt':
24
- cmd = ['apt-cache', 'show', package_name]
25
- elif package_manager in ['yum', 'dnf']:
26
- cmd = ['repoquery', '--info', package_name]
27
- else:
28
- raise ValueError("Unsupported package manager")
29
-
30
- result = subprocess.run(cmd, capture_output=True, text=True)
31
- return result.stdout
@@ -1,4 +0,0 @@
1
- from swh.model.hashutil import hash_directory
2
-
3
- def calculate_swhid(directory_path):
4
- return hash_directory(directory_path)
@@ -1,41 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: ossa-scanner
3
- Version: 0.1.0
4
- Summary: A CLI tool to scan Linux packages, manage metadata, and upload results to GitHub.
5
- Author: Oscar Valenzuela
6
- Author-email: Oscar Valenzuela <oscar.valenzuela.b@gmail.com>
7
- License: MIT License
8
-
9
- Copyright (c) 2024 Oscar V
10
-
11
- Permission is hereby granted, free of charge, to any person obtaining a copy
12
- of this software and associated documentation files (the "Software"), to deal
13
- in the Software without restriction, including without limitation the rights
14
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
- copies of the Software, and to permit persons to whom the Software is
16
- furnished to do so, subject to the following conditions:
17
-
18
- The above copyright notice and this permission notice shall be included in all
19
- copies or substantial portions of the Software.
20
-
21
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
- SOFTWARE.
28
-
29
- Keywords: linux,packages,SWHID,GitHub,open-source
30
- Classifier: Development Status :: 3 - Alpha
31
- Classifier: Intended Audience :: Developers
32
- Classifier: License :: OSI Approved :: MIT License
33
- Classifier: Programming Language :: Python :: 3
34
- Classifier: Operating System :: POSIX :: Linux
35
- Requires-Python: >=3.7
36
- Description-Content-Type: text/markdown
37
- License-File: LICENSE
38
- Requires-Dist: swh.model
39
-
40
- # ossa_scanner
41
- Open Source Advisory Scanner (Generator)
@@ -1 +0,0 @@
1
- swh.model
@@ -1,28 +0,0 @@
1
- [build-system]
2
- requires = ["setuptools", "wheel"]
3
- build-backend = "setuptools.build_meta"
4
-
5
- [project]
6
- name = "ossa-scanner"
7
- version = "0.1.0"
8
- description = "A CLI tool to scan Linux packages, manage metadata, and upload results to GitHub."
9
- readme = "README.md"
10
- requires-python = ">=3.7"
11
- license = { file = "LICENSE" }
12
- authors = [
13
- { name = "Oscar Valenzuela", email = "oscar.valenzuela.b@gmail.com" }
14
- ]
15
- classifiers = [
16
- "Development Status :: 3 - Alpha",
17
- "Intended Audience :: Developers",
18
- "License :: OSI Approved :: MIT License",
19
- "Programming Language :: Python :: 3",
20
- "Operating System :: POSIX :: Linux",
21
- ]
22
- keywords = ["linux", "packages", "SWHID", "GitHub", "open-source"]
23
- dependencies = [
24
- "swh.model",
25
- ]
26
-
27
- [project.entry-points.console_scripts]
28
- ossa-scanner = "cli:main"
@@ -1,31 +0,0 @@
1
- [metadata]
2
- name = ossa-scanner
3
- version = 0.1.0
4
- description = Open Source Advisory Generator
5
- long_description = file: README.md
6
- long_description_content_type = text/markdown
7
- author = Oscar Valenzuela
8
- author_email = oscar.valenzuela.b@gmail.com
9
- license = MIT
10
- classifiers =
11
- Development Status :: 3 - Alpha
12
- Intended Audience :: Developers
13
- License :: OSI Approved :: MIT License
14
- Programming Language :: Python :: 3
15
- Operating System :: POSIX :: Linux
16
- keywords = linux, packages, SWHID, open-source
17
-
18
- [options]
19
- packages = find:
20
- python_requires = >=3.7
21
- install_requires =
22
- swh.model
23
-
24
- [options.entry_points]
25
- console_scripts =
26
- ossa-scanner = cli:main
27
-
28
- [egg_info]
29
- tag_build =
30
- tag_date = 0
31
-
File without changes
File without changes