diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 054960f..46a6553 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,6 +20,13 @@ jobs: - uses: actions/setup-python@v5.1.0 with: python-version: "3.13" + - name: Install dependencies + run: | + pip install pip --upgrade + if grep version ../pyproject.toml | grep -q "dev"; + then pip install https://github.com/fiduswriter/fiduswriter/archive/develop.zip; + else pip install https://github.com/fiduswriter/fiduswriter/archive/main.zip; + fi - uses: pre-commit/action@v3.0.1 test: runs-on: ubuntu-latest diff --git a/lint/django_import_resolver.js b/lint/django_import_resolver.js index 941c9fe..cb902f0 100644 --- a/lint/django_import_resolver.js +++ b/lint/django_import_resolver.js @@ -5,11 +5,15 @@ const {execSync} = require("child_process") function getFidusWriterPath() { try { - return execSync( + const fwPath = execSync( "python -c \"import fiduswriter; print(next(filter(lambda path: '/site-packages/' in path, fiduswriter.__path__), ''))\"" ) .toString() .trim() + if (fwPath) { + return fwPath + } + throw new Error("Fidus Writer not found") } catch (error) { console.error( "Failed to find Fidus Writer installation:",