Skip to content

Commit 978e3b9

Browse files
committed
Migrate to poetry and optimize dependencies
1 parent 3a13af7 commit 978e3b9

File tree

22 files changed

+6292
-4264
lines changed

22 files changed

+6292
-4264
lines changed

.github/workflows/python-package.yml

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ jobs:
2222
- name: Compile and install yara
2323
run: |
2424
sudo apt-get install automake libtool make gcc pkg-config
25-
wget https://github.com/VirusTotal/yara/archive/refs/tags/v4.5.0.tar.gz
26-
tar xzf *.tar.gz
25+
wget https://github.com/VirusTotal/yara/archive/refs/tags/v4.5.0.tar.gz -O yara.tar.gz
26+
tar xzf yara.tar.gz
2727
pushd yara-*
2828
./bootstrap.sh
2929
./configure
@@ -38,31 +38,26 @@ jobs:
3838
cache: 'pip'
3939
- name: Install dependencies
4040
run: |
41-
python -m pip install --upgrade pip
42-
pip install flake8 pytest
43-
pip install pipenv
44-
sed -i "s/python_version.*/python_version = \"${{ matrix.python-version }}\"/" Pipfile
45-
pipenv lock
46-
pipenv requirements > requirements.txt
47-
# pyfaul must be installed manually (?)
48-
pip install -r requirements.txt pyfaup
49-
pip install .
41+
python -m pip install --upgrade poetry
42+
poetry install
43+
# Tell poetry to not use a virtual environment
44+
# poetry config virtualenvs.create false
5045
- name: Lint with flake8
5146
run: |
5247
# stop the build if there are Python syntax errors or undefined names
53-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
48+
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
5449
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
55-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
50+
poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
5651
- name: Run server in background
5752
run: |
58-
misp-modules -l 127.0.0.1 -s 2>error.log &
59-
sleep 3
53+
poetry run misp-modules -l 127.0.0.1 -s 2>error.log &
54+
sleep 10
6055
- name: Check if server is running
6156
run: |
6257
curl -sS localhost:6666/healthcheck
6358
- name: Test with pytest
6459
run: |
65-
pytest tests
60+
poetry run pytest
6661
- name: Show error log
6762
if: always()
6863
run: |

.travis.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.

DOC-REQUIREMENTS

Lines changed: 0 additions & 3 deletions
This file was deleted.

Makefile

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,30 @@
33
.PHONY: prepare_docs generate_docs ci_generate_docs test_docs
44

55
prepare_docs:
6-
pip3 install .
7-
cd documentation; python3 generate_documentation.py
8-
mkdir -p docs/expansion/logos docs/export_mod/logos docs/import_mod/logos
6+
cd documentation
7+
poetry run ./documentation/generate_documentation.py
8+
mkdir -p docs/expansion/logos
9+
mkdir -p docs/export_mod/logos
10+
mkdir -p docs/import_mod/logos
911
mkdir -p docs/logos
10-
cd documentation; cp -R ./logos/* ../docs/logos
12+
cd documentation; cp -R ./logos/* ../docs/logos
1113
cd documentation; cp -R ./logos/* ../docs/expansion/logos
1214
cd documentation; cp -R ./logos/* ../docs/export_mod/logos
1315
cd documentation; cp -R ./logos/* ../docs/import_mod/logos
1416
cp ./documentation/mkdocs/*.md ./docs
1517
cp LICENSE ./docs/license.md
1618

1719
install_requirements:
18-
pip install -r docs/REQUIREMENTS.txt
20+
poetry install --only docs
1921

2022
generate_docs: prepare_docs
21-
mkdocs build
23+
poetry run mkdocs build
2224

2325
deploy:
24-
mkdocs gh-deploy
26+
poetry run mkdocs gh-deploy
2527

2628
test_docs: prepare_docs
27-
mkdocs serve
29+
poetry run mkdocs serve
2830

2931

3032
# DOCKER make commands

Pipfile

Lines changed: 0 additions & 87 deletions
This file was deleted.

0 commit comments

Comments
 (0)