diffinite 0.5.0__tar.gz → 0.6.0__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.
- {diffinite-0.5.0/src/diffinite.egg-info → diffinite-0.6.0}/PKG-INFO +1 -1
- {diffinite-0.5.0 → diffinite-0.6.0}/pyproject.toml +1 -1
- diffinite-0.6.0/src/diffinite/__main__.py +11 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/src/diffinite/deep_compare.py +3 -1
- {diffinite-0.5.0 → diffinite-0.6.0/src/diffinite.egg-info}/PKG-INFO +1 -1
- diffinite-0.5.0/src/diffinite/__main__.py +0 -5
- {diffinite-0.5.0 → diffinite-0.6.0}/LICENSE +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/NOTICE +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/README.md +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/setup.cfg +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/src/diffinite/__init__.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/src/diffinite/cli.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/src/diffinite/collector.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/src/diffinite/differ.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/src/diffinite/evidence.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/src/diffinite/fingerprint.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/src/diffinite/languages/__init__.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/src/diffinite/languages/_registry.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/src/diffinite/languages/_spec.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/src/diffinite/languages/c_family.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/src/diffinite/languages/csharp.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/src/diffinite/languages/data.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/src/diffinite/languages/go_rust_swift.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/src/diffinite/languages/java.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/src/diffinite/languages/javascript.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/src/diffinite/languages/markup.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/src/diffinite/languages/python.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/src/diffinite/languages/scripting.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/src/diffinite/models.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/src/diffinite/parser.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/src/diffinite/pdf_gen.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/src/diffinite/pipeline.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/src/diffinite.egg-info/SOURCES.txt +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/src/diffinite.egg-info/dependency_links.txt +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/src/diffinite.egg-info/entry_points.txt +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/src/diffinite.egg-info/requires.txt +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/src/diffinite.egg-info/top_level.txt +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/tests/test_cli.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/tests/test_collector.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/tests/test_deep_compare.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/tests/test_differ.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/tests/test_differ_extended.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/tests/test_evidence.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/tests/test_evidence_hash.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/tests/test_fingerprint.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/tests/test_languages.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/tests/test_normalize.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/tests/test_parser.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/tests/test_pdf_gen.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/tests/test_pipeline.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/tests/test_plagiarism_dataset.py +0 -0
- {diffinite-0.5.0 → diffinite-0.6.0}/tests/test_sqlite_integration.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "diffinite"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.6.0"
|
|
8
8
|
description = "Forensic source-code comparison tool — Winnowing fingerprints and professional PDF reports for IP litigation & code audit"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = {text = "Apache-2.0"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"""Allow ``python -m diffinite``."""
|
|
2
|
+
|
|
3
|
+
import multiprocessing
|
|
4
|
+
|
|
5
|
+
from diffinite.cli import main
|
|
6
|
+
|
|
7
|
+
# Required for PyInstaller frozen executables.
|
|
8
|
+
# Without this, ProcessPoolExecutor child processes crash on Windows.
|
|
9
|
+
# Ref: https://docs.python.org/3/library/multiprocessing.html#multiprocessing.freeze_support
|
|
10
|
+
multiprocessing.freeze_support()
|
|
11
|
+
main()
|
|
@@ -31,6 +31,7 @@ Winnowing 핑거프린트의 **역 인덱스(Inverted Index)** 를 활용하여,
|
|
|
31
31
|
from __future__ import annotations
|
|
32
32
|
|
|
33
33
|
import logging
|
|
34
|
+
import multiprocessing
|
|
34
35
|
from collections import defaultdict
|
|
35
36
|
from concurrent.futures import ProcessPoolExecutor
|
|
36
37
|
from pathlib import Path
|
|
@@ -176,7 +177,8 @@ def run_deep_compare(
|
|
|
176
177
|
fp_b: dict[str, set[int]] = {}
|
|
177
178
|
|
|
178
179
|
all_items = items_a + items_b
|
|
179
|
-
|
|
180
|
+
ctx = multiprocessing.get_context("spawn")
|
|
181
|
+
with ProcessPoolExecutor(max_workers=workers, mp_context=ctx) as pool:
|
|
180
182
|
results = list(pool.map(_extract_one, all_items))
|
|
181
183
|
|
|
182
184
|
for i, (rel, hset, cnt) in enumerate(results):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|