text2ioc 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.
- text2ioc-0.1.2/.cruft.json +22 -0
- text2ioc-0.1.2/.editorconfig +21 -0
- text2ioc-0.1.2/.flake8 +5 -0
- text2ioc-0.1.2/.github/workflows/test.yml +67 -0
- text2ioc-0.1.2/.github/workflows/wheels.yml +85 -0
- text2ioc-0.1.2/.gitignore +110 -0
- text2ioc-0.1.2/AUTHORS.md +10 -0
- text2ioc-0.1.2/Cargo.lock +226 -0
- text2ioc-0.1.2/Cargo.toml +15 -0
- text2ioc-0.1.2/Dockerfile +41 -0
- text2ioc-0.1.2/HISTORY.md +7 -0
- text2ioc-0.1.2/MANIFEST.in +10 -0
- text2ioc-0.1.2/Makefile +82 -0
- text2ioc-0.1.2/PKG-INFO +112 -0
- text2ioc-0.1.2/README.md +92 -0
- text2ioc-0.1.2/pyproject.toml +32 -0
- text2ioc-0.1.2/requirements.txt +1 -0
- text2ioc-0.1.2/requirements_dev.txt +12 -0
- text2ioc-0.1.2/setup.cfg +33 -0
- text2ioc-0.1.2/setup.py +46 -0
- text2ioc-0.1.2/src/lib.rs +1392 -0
- text2ioc-0.1.2/tests/__init__.py +1 -0
- text2ioc-0.1.2/tests/test_ioc.py +1202 -0
- text2ioc-0.1.2/text2ioc/__init__.py +17 -0
- text2ioc-0.1.2/text2ioc/ioc.py +331 -0
- text2ioc-0.1.2/tox.ini +44 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"template": "git@github.com:juanmcristobal/pypackage-basic.git",
|
|
3
|
+
"commit": "180228fdc908a9b8281686705da1e407cacb7407",
|
|
4
|
+
"checkout": null,
|
|
5
|
+
"context": {
|
|
6
|
+
"cookiecutter": {
|
|
7
|
+
"full_name": "Juan Manuel Cristóbal Moreno",
|
|
8
|
+
"email": "juanmcristobal@gmail.com",
|
|
9
|
+
"github_username": "juanmcristobal",
|
|
10
|
+
"project_name": "text2ioc",
|
|
11
|
+
"project_slug": "text2ioc",
|
|
12
|
+
"project_short_description": "Python package for extracting Indicators of Compromise (IOCs) from unstructured text of any length, including articles, reports, logs, and threat intelligence documents.",
|
|
13
|
+
"version": "0.1.0",
|
|
14
|
+
"private_repo": "y",
|
|
15
|
+
"command_line_interface": "No command-line interface",
|
|
16
|
+
"__pypackage_version": "0.1.0",
|
|
17
|
+
"_template": "git@github.com:juanmcristobal/pypackage-basic.git",
|
|
18
|
+
"_commit": "180228fdc908a9b8281686705da1e407cacb7407"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"directory": null
|
|
22
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# http://editorconfig.org
|
|
2
|
+
|
|
3
|
+
root = true
|
|
4
|
+
|
|
5
|
+
[*]
|
|
6
|
+
indent_style = space
|
|
7
|
+
indent_size = 4
|
|
8
|
+
trim_trailing_whitespace = true
|
|
9
|
+
insert_final_newline = true
|
|
10
|
+
charset = utf-8
|
|
11
|
+
end_of_line = lf
|
|
12
|
+
|
|
13
|
+
[*.bat]
|
|
14
|
+
indent_style = tab
|
|
15
|
+
end_of_line = crlf
|
|
16
|
+
|
|
17
|
+
[LICENSE]
|
|
18
|
+
insert_final_newline = false
|
|
19
|
+
|
|
20
|
+
[Makefile]
|
|
21
|
+
indent_style = tab
|
text2ioc-0.1.2/.flake8
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
name: Test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ["*"]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: ["*"]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ${{ matrix.os }}
|
|
12
|
+
strategy:
|
|
13
|
+
fail-fast: false
|
|
14
|
+
matrix:
|
|
15
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
16
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
17
|
+
steps:
|
|
18
|
+
- name: Checkout
|
|
19
|
+
uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- name: Set up Python
|
|
22
|
+
uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: ${{ matrix.python-version }}
|
|
25
|
+
|
|
26
|
+
- name: Set up Rust
|
|
27
|
+
uses: dtolnay/rust-toolchain@stable
|
|
28
|
+
|
|
29
|
+
- name: Install dependencies
|
|
30
|
+
run: |
|
|
31
|
+
python -m pip install --upgrade pip setuptools wheel
|
|
32
|
+
python -m pip install coverage pytest maturin
|
|
33
|
+
python -m pip install -r requirements.txt
|
|
34
|
+
|
|
35
|
+
- name: Install package
|
|
36
|
+
run: python -m pip install -e .
|
|
37
|
+
|
|
38
|
+
- name: Pytest
|
|
39
|
+
run: pytest
|
|
40
|
+
|
|
41
|
+
coverage:
|
|
42
|
+
runs-on: ubuntu-latest
|
|
43
|
+
steps:
|
|
44
|
+
- name: Checkout
|
|
45
|
+
uses: actions/checkout@v4
|
|
46
|
+
|
|
47
|
+
- name: Set up Python
|
|
48
|
+
uses: actions/setup-python@v5
|
|
49
|
+
with:
|
|
50
|
+
python-version: "3.10"
|
|
51
|
+
|
|
52
|
+
- name: Set up Rust
|
|
53
|
+
uses: dtolnay/rust-toolchain@stable
|
|
54
|
+
|
|
55
|
+
- name: Install dependencies
|
|
56
|
+
run: |
|
|
57
|
+
python -m pip install --upgrade pip setuptools wheel
|
|
58
|
+
python -m pip install coverage pytest maturin
|
|
59
|
+
python -m pip install -r requirements.txt
|
|
60
|
+
|
|
61
|
+
- name: Install package
|
|
62
|
+
run: python -m pip install -e .
|
|
63
|
+
|
|
64
|
+
- name: Coverage
|
|
65
|
+
run: |
|
|
66
|
+
coverage run --source text2ioc -m pytest
|
|
67
|
+
coverage report --show-missing --fail-under=95
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
name: Wheels
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build:
|
|
11
|
+
strategy:
|
|
12
|
+
fail-fast: false
|
|
13
|
+
matrix:
|
|
14
|
+
include:
|
|
15
|
+
- name: linux-x86_64
|
|
16
|
+
os: ubuntu-latest
|
|
17
|
+
target: x86_64-unknown-linux-gnu
|
|
18
|
+
manylinux: "2_28"
|
|
19
|
+
- name: windows-x86_64
|
|
20
|
+
os: windows-latest
|
|
21
|
+
target: x86_64-pc-windows-msvc
|
|
22
|
+
- name: macos-arm64
|
|
23
|
+
os: macos-latest
|
|
24
|
+
target: aarch64-apple-darwin
|
|
25
|
+
- name: macos-x86_64
|
|
26
|
+
os: macos-15-intel
|
|
27
|
+
target: x86_64-apple-darwin
|
|
28
|
+
runs-on: ${{ matrix.os }}
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@v4
|
|
31
|
+
|
|
32
|
+
- name: Build wheels
|
|
33
|
+
uses: PyO3/maturin-action@v1
|
|
34
|
+
with:
|
|
35
|
+
command: build
|
|
36
|
+
target: ${{ matrix.target }}
|
|
37
|
+
manylinux: ${{ matrix.manylinux || 'off' }}
|
|
38
|
+
args: --release --out dist --compatibility pypi
|
|
39
|
+
|
|
40
|
+
- name: Upload wheels
|
|
41
|
+
uses: actions/upload-artifact@v4
|
|
42
|
+
with:
|
|
43
|
+
name: wheels-${{ matrix.name }}
|
|
44
|
+
path: dist
|
|
45
|
+
|
|
46
|
+
sdist:
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
steps:
|
|
49
|
+
- uses: actions/checkout@v4
|
|
50
|
+
|
|
51
|
+
- name: Build sdist
|
|
52
|
+
uses: PyO3/maturin-action@v1
|
|
53
|
+
with:
|
|
54
|
+
command: sdist
|
|
55
|
+
args: --out dist
|
|
56
|
+
|
|
57
|
+
- name: Upload sdist
|
|
58
|
+
uses: actions/upload-artifact@v4
|
|
59
|
+
with:
|
|
60
|
+
name: sdist
|
|
61
|
+
path: dist
|
|
62
|
+
|
|
63
|
+
pypi-publish:
|
|
64
|
+
name: Publish to PyPI
|
|
65
|
+
runs-on: ubuntu-latest
|
|
66
|
+
needs: [build, sdist]
|
|
67
|
+
environment: pypi
|
|
68
|
+
permissions:
|
|
69
|
+
id-token: write
|
|
70
|
+
steps:
|
|
71
|
+
- name: Download wheel artifacts
|
|
72
|
+
uses: actions/download-artifact@v4
|
|
73
|
+
with:
|
|
74
|
+
pattern: wheels-*
|
|
75
|
+
path: dist
|
|
76
|
+
merge-multiple: true
|
|
77
|
+
|
|
78
|
+
- name: Download sdist artifact
|
|
79
|
+
uses: actions/download-artifact@v4
|
|
80
|
+
with:
|
|
81
|
+
name: sdist
|
|
82
|
+
path: dist
|
|
83
|
+
|
|
84
|
+
- name: Publish package distributions to PyPI
|
|
85
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
env/
|
|
12
|
+
build/
|
|
13
|
+
develop-eggs/
|
|
14
|
+
dist/
|
|
15
|
+
downloads/
|
|
16
|
+
eggs/
|
|
17
|
+
.eggs/
|
|
18
|
+
lib/
|
|
19
|
+
lib64/
|
|
20
|
+
parts/
|
|
21
|
+
sdist/
|
|
22
|
+
var/
|
|
23
|
+
wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
|
|
28
|
+
# PyInstaller
|
|
29
|
+
# Usually these files are written by a python script from a template
|
|
30
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
31
|
+
*.manifest
|
|
32
|
+
*.spec
|
|
33
|
+
|
|
34
|
+
# Installer logs
|
|
35
|
+
pip-log.txt
|
|
36
|
+
pip-delete-this-directory.txt
|
|
37
|
+
|
|
38
|
+
# Unit test / coverage reports
|
|
39
|
+
htmlcov/
|
|
40
|
+
.tox/
|
|
41
|
+
.coverage
|
|
42
|
+
.coverage.*
|
|
43
|
+
.cache
|
|
44
|
+
nosetests.xml
|
|
45
|
+
coverage.xml
|
|
46
|
+
*.cover
|
|
47
|
+
.hypothesis/
|
|
48
|
+
.pytest_cache/
|
|
49
|
+
.benchmark-cache/
|
|
50
|
+
|
|
51
|
+
# Translations
|
|
52
|
+
*.mo
|
|
53
|
+
*.pot
|
|
54
|
+
|
|
55
|
+
# Django stuff:
|
|
56
|
+
*.log
|
|
57
|
+
local_settings.py
|
|
58
|
+
|
|
59
|
+
# Flask stuff:
|
|
60
|
+
instance/
|
|
61
|
+
.webassets-cache
|
|
62
|
+
|
|
63
|
+
# Scrapy stuff:
|
|
64
|
+
.scrapy
|
|
65
|
+
|
|
66
|
+
# Sphinx documentation
|
|
67
|
+
docs/_build/
|
|
68
|
+
|
|
69
|
+
# PyBuilder
|
|
70
|
+
target/
|
|
71
|
+
|
|
72
|
+
# Jupyter Notebook
|
|
73
|
+
.ipynb_checkpoints
|
|
74
|
+
|
|
75
|
+
# pyenv
|
|
76
|
+
.python-version
|
|
77
|
+
|
|
78
|
+
# celery beat schedule file
|
|
79
|
+
celerybeat-schedule
|
|
80
|
+
|
|
81
|
+
# SageMath parsed files
|
|
82
|
+
*.sage.py
|
|
83
|
+
|
|
84
|
+
# dotenv
|
|
85
|
+
.env
|
|
86
|
+
|
|
87
|
+
# virtualenv
|
|
88
|
+
.venv
|
|
89
|
+
venv/
|
|
90
|
+
ENV/
|
|
91
|
+
|
|
92
|
+
# Spyder project settings
|
|
93
|
+
.spyderproject
|
|
94
|
+
.spyproject
|
|
95
|
+
|
|
96
|
+
# Rope project settings
|
|
97
|
+
.ropeproject
|
|
98
|
+
|
|
99
|
+
# mkdocs documentation
|
|
100
|
+
/site
|
|
101
|
+
|
|
102
|
+
# mypy
|
|
103
|
+
.mypy_cache/
|
|
104
|
+
|
|
105
|
+
# IDE settings
|
|
106
|
+
.vscode/
|
|
107
|
+
.idea/
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
*.jsonl
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 4
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "aho-corasick"
|
|
7
|
+
version = "1.1.4"
|
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
+
checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301"
|
|
10
|
+
dependencies = [
|
|
11
|
+
"memchr",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
[[package]]
|
|
15
|
+
name = "autocfg"
|
|
16
|
+
version = "1.5.0"
|
|
17
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
18
|
+
checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
|
|
19
|
+
|
|
20
|
+
[[package]]
|
|
21
|
+
name = "cfg-if"
|
|
22
|
+
version = "1.0.4"
|
|
23
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
24
|
+
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
|
|
25
|
+
|
|
26
|
+
[[package]]
|
|
27
|
+
name = "heck"
|
|
28
|
+
version = "0.5.0"
|
|
29
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
30
|
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
31
|
+
|
|
32
|
+
[[package]]
|
|
33
|
+
name = "indoc"
|
|
34
|
+
version = "2.0.7"
|
|
35
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
36
|
+
checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
|
|
37
|
+
dependencies = [
|
|
38
|
+
"rustversion",
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
[[package]]
|
|
42
|
+
name = "libc"
|
|
43
|
+
version = "0.2.183"
|
|
44
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
45
|
+
checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d"
|
|
46
|
+
|
|
47
|
+
[[package]]
|
|
48
|
+
name = "memchr"
|
|
49
|
+
version = "2.8.0"
|
|
50
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
51
|
+
checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
|
|
52
|
+
|
|
53
|
+
[[package]]
|
|
54
|
+
name = "memoffset"
|
|
55
|
+
version = "0.9.1"
|
|
56
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
57
|
+
checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
|
|
58
|
+
dependencies = [
|
|
59
|
+
"autocfg",
|
|
60
|
+
]
|
|
61
|
+
|
|
62
|
+
[[package]]
|
|
63
|
+
name = "once_cell"
|
|
64
|
+
version = "1.21.4"
|
|
65
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
66
|
+
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
|
67
|
+
|
|
68
|
+
[[package]]
|
|
69
|
+
name = "portable-atomic"
|
|
70
|
+
version = "1.13.1"
|
|
71
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
72
|
+
checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
|
|
73
|
+
|
|
74
|
+
[[package]]
|
|
75
|
+
name = "proc-macro2"
|
|
76
|
+
version = "1.0.106"
|
|
77
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
78
|
+
checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
|
|
79
|
+
dependencies = [
|
|
80
|
+
"unicode-ident",
|
|
81
|
+
]
|
|
82
|
+
|
|
83
|
+
[[package]]
|
|
84
|
+
name = "pyo3"
|
|
85
|
+
version = "0.23.5"
|
|
86
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
87
|
+
checksum = "7778bffd85cf38175ac1f545509665d0b9b92a198ca7941f131f85f7a4f9a872"
|
|
88
|
+
dependencies = [
|
|
89
|
+
"cfg-if",
|
|
90
|
+
"indoc",
|
|
91
|
+
"libc",
|
|
92
|
+
"memoffset",
|
|
93
|
+
"once_cell",
|
|
94
|
+
"portable-atomic",
|
|
95
|
+
"pyo3-build-config",
|
|
96
|
+
"pyo3-ffi",
|
|
97
|
+
"pyo3-macros",
|
|
98
|
+
"unindent",
|
|
99
|
+
]
|
|
100
|
+
|
|
101
|
+
[[package]]
|
|
102
|
+
name = "pyo3-build-config"
|
|
103
|
+
version = "0.23.5"
|
|
104
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
105
|
+
checksum = "94f6cbe86ef3bf18998d9df6e0f3fc1050a8c5efa409bf712e661a4366e010fb"
|
|
106
|
+
dependencies = [
|
|
107
|
+
"once_cell",
|
|
108
|
+
"target-lexicon",
|
|
109
|
+
]
|
|
110
|
+
|
|
111
|
+
[[package]]
|
|
112
|
+
name = "pyo3-ffi"
|
|
113
|
+
version = "0.23.5"
|
|
114
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
115
|
+
checksum = "e9f1b4c431c0bb1c8fb0a338709859eed0d030ff6daa34368d3b152a63dfdd8d"
|
|
116
|
+
dependencies = [
|
|
117
|
+
"libc",
|
|
118
|
+
"pyo3-build-config",
|
|
119
|
+
]
|
|
120
|
+
|
|
121
|
+
[[package]]
|
|
122
|
+
name = "pyo3-macros"
|
|
123
|
+
version = "0.23.5"
|
|
124
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
125
|
+
checksum = "fbc2201328f63c4710f68abdf653c89d8dbc2858b88c5d88b0ff38a75288a9da"
|
|
126
|
+
dependencies = [
|
|
127
|
+
"proc-macro2",
|
|
128
|
+
"pyo3-macros-backend",
|
|
129
|
+
"quote",
|
|
130
|
+
"syn",
|
|
131
|
+
]
|
|
132
|
+
|
|
133
|
+
[[package]]
|
|
134
|
+
name = "pyo3-macros-backend"
|
|
135
|
+
version = "0.23.5"
|
|
136
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
137
|
+
checksum = "fca6726ad0f3da9c9de093d6f116a93c1a38e417ed73bf138472cf4064f72028"
|
|
138
|
+
dependencies = [
|
|
139
|
+
"heck",
|
|
140
|
+
"proc-macro2",
|
|
141
|
+
"pyo3-build-config",
|
|
142
|
+
"quote",
|
|
143
|
+
"syn",
|
|
144
|
+
]
|
|
145
|
+
|
|
146
|
+
[[package]]
|
|
147
|
+
name = "quote"
|
|
148
|
+
version = "1.0.45"
|
|
149
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
150
|
+
checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
|
|
151
|
+
dependencies = [
|
|
152
|
+
"proc-macro2",
|
|
153
|
+
]
|
|
154
|
+
|
|
155
|
+
[[package]]
|
|
156
|
+
name = "regex"
|
|
157
|
+
version = "1.12.3"
|
|
158
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
159
|
+
checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276"
|
|
160
|
+
dependencies = [
|
|
161
|
+
"aho-corasick",
|
|
162
|
+
"memchr",
|
|
163
|
+
"regex-automata",
|
|
164
|
+
"regex-syntax",
|
|
165
|
+
]
|
|
166
|
+
|
|
167
|
+
[[package]]
|
|
168
|
+
name = "regex-automata"
|
|
169
|
+
version = "0.4.14"
|
|
170
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
171
|
+
checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f"
|
|
172
|
+
dependencies = [
|
|
173
|
+
"aho-corasick",
|
|
174
|
+
"memchr",
|
|
175
|
+
"regex-syntax",
|
|
176
|
+
]
|
|
177
|
+
|
|
178
|
+
[[package]]
|
|
179
|
+
name = "regex-syntax"
|
|
180
|
+
version = "0.8.10"
|
|
181
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
182
|
+
checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a"
|
|
183
|
+
|
|
184
|
+
[[package]]
|
|
185
|
+
name = "rustversion"
|
|
186
|
+
version = "1.0.22"
|
|
187
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
188
|
+
checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
|
|
189
|
+
|
|
190
|
+
[[package]]
|
|
191
|
+
name = "syn"
|
|
192
|
+
version = "2.0.117"
|
|
193
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
194
|
+
checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
|
|
195
|
+
dependencies = [
|
|
196
|
+
"proc-macro2",
|
|
197
|
+
"quote",
|
|
198
|
+
"unicode-ident",
|
|
199
|
+
]
|
|
200
|
+
|
|
201
|
+
[[package]]
|
|
202
|
+
name = "target-lexicon"
|
|
203
|
+
version = "0.12.16"
|
|
204
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
205
|
+
checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
|
|
206
|
+
|
|
207
|
+
[[package]]
|
|
208
|
+
name = "text2ioc-native"
|
|
209
|
+
version = "0.1.2"
|
|
210
|
+
dependencies = [
|
|
211
|
+
"once_cell",
|
|
212
|
+
"pyo3",
|
|
213
|
+
"regex",
|
|
214
|
+
]
|
|
215
|
+
|
|
216
|
+
[[package]]
|
|
217
|
+
name = "unicode-ident"
|
|
218
|
+
version = "1.0.24"
|
|
219
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
220
|
+
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
|
221
|
+
|
|
222
|
+
[[package]]
|
|
223
|
+
name = "unindent"
|
|
224
|
+
version = "0.2.4"
|
|
225
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
226
|
+
checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
name = "text2ioc-native"
|
|
3
|
+
version = "0.1.2"
|
|
4
|
+
edition = "2021"
|
|
5
|
+
description = "Native Rust core for text2ioc"
|
|
6
|
+
readme = "README.md"
|
|
7
|
+
|
|
8
|
+
[lib]
|
|
9
|
+
name = "_native"
|
|
10
|
+
crate-type = ["cdylib"]
|
|
11
|
+
|
|
12
|
+
[dependencies]
|
|
13
|
+
once_cell = "1.21.3"
|
|
14
|
+
pyo3 = { version = "0.23.5", features = ["abi3-py310", "extension-module"] }
|
|
15
|
+
regex = "1.12.2"
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Use Ubuntu 22.04 to keep Python package availability current
|
|
2
|
+
FROM ubuntu:22.04
|
|
3
|
+
|
|
4
|
+
# Set environment variables
|
|
5
|
+
ENV DEBIAN_FRONTEND=noninteractive
|
|
6
|
+
|
|
7
|
+
# Set the working directory inside the container
|
|
8
|
+
WORKDIR /app
|
|
9
|
+
|
|
10
|
+
# Update the package list and install essential packages
|
|
11
|
+
RUN apt-get update && apt-get install -y \
|
|
12
|
+
software-properties-common \
|
|
13
|
+
curl \
|
|
14
|
+
&& apt-get clean
|
|
15
|
+
|
|
16
|
+
# Add the deadsnakes PPA for multiple Python versions
|
|
17
|
+
RUN add-apt-repository -y ppa:deadsnakes/ppa
|
|
18
|
+
|
|
19
|
+
# Update the package list again to include the new repository
|
|
20
|
+
RUN apt-get update
|
|
21
|
+
|
|
22
|
+
# Install Python versions used by tox in this project template
|
|
23
|
+
RUN apt-get install -y \
|
|
24
|
+
python3.10 \
|
|
25
|
+
python3.11 \
|
|
26
|
+
python3.12 \
|
|
27
|
+
python3.13 \
|
|
28
|
+
&& apt-get clean
|
|
29
|
+
|
|
30
|
+
# Set Python 3.10 as the default python version
|
|
31
|
+
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1
|
|
32
|
+
|
|
33
|
+
# Install pip for Python 3.10
|
|
34
|
+
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
|
35
|
+
RUN python3.10 get-pip.py
|
|
36
|
+
|
|
37
|
+
# Install tox for Python 3
|
|
38
|
+
RUN python3 -m pip install tox
|
|
39
|
+
|
|
40
|
+
# Set the default command to run tox
|
|
41
|
+
CMD ["tox"]
|