Skip to content

Commit

Permalink
fixed #33
Browse files Browse the repository at this point in the history
  • Loading branch information
marzer committed Sep 10, 2023
1 parent 7e1b7aa commit 6094c2c
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,10 @@ jobs:
cd "${{ github.workspace }}/repo"
sudo python3 -m pip install --upgrade .
- name: Print poxy help
- name: Print poxy help and version
run: |
poxy --help
poxy --version
- name: Build and install doxygen from source
if: ${{ matrix.doxygen_tag != 'none' }}
Expand All @@ -132,6 +133,7 @@ jobs:
run: |
sudo apt -y install doxygen
doxygen --version
poxy --doxygen-version
- name: Run poxy on test_project
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# test outputs
tests/**/html/
tests/**/xml/
tests/**/latex/

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Changelog

## v0.13.9 - 2023-09-10

- fixed crash on Doxygen <= 1.8.17 (#33) (@tim-janik)

## v0.13.8 - 2023-09-09

- fixed regression for Python <= 3.8 (#32) (@timjanik)
- fixed regression for Python <= 3.8 (#32) (@tim-janik)

## v0.13.7 - 2023-08-17

Expand Down
7 changes: 5 additions & 2 deletions src/poxy/doxygen.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import itertools
import os
import re
import shutil
import subprocess
from typing import Tuple
Expand Down Expand Up @@ -118,7 +119,7 @@ def version() -> Tuple[int, int, int]:
ret = proc.stdout.strip() if proc.stdout is not None else ''
if not ret and proc.stderr.strip():
raise Error(rf'doxygen exited with error: {proc.stderr.strip()}')
ret = re.fullmatch(r'\s*[v]?\s*([0-9]+)\s*\.\s*([0-9]+)\s*\.\s*([0-9])(\s.+?)?', ret, flags=re.I)
ret = re.fullmatch(r'^\s*v?\s*([0-9]+)\s*[.]\s*([0-9]+)\s*[.]\s*([0-9]+)(?:[^0-9].*)?$', ret, flags=re.I)
assert ret
version.val = (int(ret[1]), int(ret[2]), int(ret[3]))
return version.val
Expand Down Expand Up @@ -171,7 +172,9 @@ def cleanup(self):
if not self.__dirty:
return
if 1:
log(self.__logger, rf'Invoking doxygen to clean doxyfile')
log(self.__logger, rf'Cleaning doxyfile')
# https://github.com/marzer/poxy/issues/33:
self.__text = re.sub(r'_ENCODING\s*=\s*"([^"]*?)"', r'_ENCODING = \1', self.__text)
result = subprocess.run(
[str(path()), r'-s', r'-u', r'-'],
check=True,
Expand Down
11 changes: 10 additions & 1 deletion src/poxy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import sys
import zipfile

from . import css, emoji, graph, mcss, paths
from . import css, doxygen, emoji, graph, mcss, paths
from .run import run
from .schemas import SchemaError
from .utils import *
Expand Down Expand Up @@ -217,6 +217,7 @@ def main(invoker=True):
make_boolean_optional_arg(args, r'update-fonts', default=None, help=argparse.SUPPRESS)
args.add_argument(r'--update-emoji', action=r'store_true', help=argparse.SUPPRESS) #
args.add_argument(r'--update-tests', action=r'store_true', help=argparse.SUPPRESS) #
args.add_argument(r'--doxygen-version', action=r'store_true', help=argparse.SUPPRESS) #
args.add_argument(
r'--update-mcss', type=Path, default=None, metavar=r'<path>', help=argparse.SUPPRESS, dest=r'mcss'
) #
Expand All @@ -235,6 +236,14 @@ def main(invoker=True):
print(VERSION_STRING)
return

# --------------------------------------------------------------
# --doxygen-version
# --------------------------------------------------------------

if args.doxygen_version:
print(doxygen.version_string())
return

# --------------------------------------------------------------
# --where
# --------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/poxy/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.13.8
0.13.9

0 comments on commit 6094c2c

Please sign in to comment.