Skip to content

Commit

Permalink
ga: require fw for pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneswilm committed Oct 24, 2024
1 parent 25a46f2 commit f484df5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ jobs:
- uses: actions/[email protected]
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/[email protected]
test:
runs-on: ubuntu-latest
Expand Down
6 changes: 5 additions & 1 deletion lint/django_import_resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -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:",
Expand Down

0 comments on commit f484df5

Please sign in to comment.