Skip to content

Commit dd35a49

Browse files
authored
Remove libolm usage & switch to poetry (#65)
This PR does a couple of things. - convert to using poetry to make rust integration easier - switch over to using vodozemac for crypto - switch over to matrix-sdk-crypto to remove mautrix dependency (which was pulling in libolm) After this, libolm is no longer used and it has been removed from the CI workflow to be sure. All functionality remains compatible with previous version of the matrix-content-scanner.
1 parent 5f99639 commit dd35a49

27 files changed

+3820
-261
lines changed

.dockerignore

+5
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,10 @@
66
!README.md
77
!pyproject.toml
88
!setup.cfg
9+
!poetry.lock
10+
!Cargo.toml
11+
!Cargo.lock
12+
!build_rust.py
13+
!rust
914

1015
**/__pycache__

.github/workflows/ci.yml

+16-11
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,28 @@ jobs:
99
name: Check code style
1010
runs-on: ubuntu-latest
1111
steps:
12-
- run: sudo apt-get install -y libolm-dev libmagic1
13-
- uses: actions/checkout@v2
12+
- run: sudo apt-get install -y libmagic1
13+
- uses: actions/checkout@v4
14+
- name: Install Rust
15+
uses: dtolnay/rust-toolchain@stable
1416
- uses: actions/setup-python@v2
1517
with:
1618
python-version: "3.11"
17-
- run: python -m pip install tox
19+
- run: python -m pip install tox "poetry==1.8.3"
1820
- run: tox -e check_codestyle
1921

2022
check-types:
2123
name: Check types with Mypy
2224
runs-on: ubuntu-latest
2325
steps:
24-
- run: sudo apt-get install -y libolm-dev libmagic1
25-
- uses: actions/checkout@v2
26+
- run: sudo apt-get install -y libmagic1
27+
- uses: actions/checkout@v4
28+
- name: Install Rust
29+
uses: dtolnay/rust-toolchain@stable
2630
- uses: actions/setup-python@v2
2731
with:
2832
python-version: "3.11"
29-
- run: python -m pip install tox
33+
- run: python -m pip install tox "poetry==1.8.3"
3034
- run: tox -e check_types
3135

3236
unit-tests:
@@ -36,13 +40,14 @@ jobs:
3640
matrix:
3741
# Run the unit tests both against our oldest supported Python version
3842
# and the newest stable.
39-
python_version: [ "3.8", "3.11" ]
43+
python_version: [ "3.10", "3.12" ]
4044
steps:
41-
- run: sudo apt-get install -y libolm-dev libmagic1
42-
- uses: actions/checkout@v2
45+
- run: sudo apt-get install -y libmagic1
46+
- uses: actions/checkout@v4
47+
- name: Install Rust
48+
uses: dtolnay/rust-toolchain@stable
4349
- uses: actions/setup-python@v2
4450
with:
4551
python-version: ${{ matrix.python_version }}
46-
- run: python -m pip install tox
52+
- run: python -m pip install tox "poetry==1.8.3"
4753
- run: tox -e py
48-

.gitignore

+8-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,11 @@ config.yaml
1010
/build
1111
/.vscode
1212
mcs_pickle.txt
13-
pickle
13+
pickle
14+
15+
# Poetry will create a setup.py, which we don't want to include.
16+
/setup.py
17+
18+
# rust
19+
/target/
20+
/src/matrix_content_scanner/*.so

0 commit comments

Comments
 (0)