Skip to content

Commit

Permalink
fix regex escape in _get_pandoc_urls (#362)
Browse files Browse the repository at this point in the history
* fix regex escape in _get_pandoc_urls

* Updated lock file to fix gh actions

* fixed ci error

---------

Co-authored-by: JessicaTegner <jessica.tegner@outlook.com>
  • Loading branch information
jfishe and JessicaTegner committed Apr 11, 2024
1 parent 315c6b9 commit 31105f1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
- name: Build binary Archive
uses: pypa/cibuildwheel@v2.16.5
env:
CIBW_BEFORE_ALL: "python3 -m pip install setuptools && mv setup_binary.py setup.py && python3 setup.py download_pandoc"
CIBW_BEFORE_ALL: "python3 -m pip install --break-system-packages setuptools && mv setup_binary.py setup.py && python3 setup.py download_pandoc"
CIBW_BUILD: cp39-* # Build any 1 python version as this wheel is not version dependent
# We skip some variants because:
# - pandoc does not publish binaries for Linux 32bit
Expand Down
8 changes: 3 additions & 5 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pypandoc/pandoc_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def _get_pandoc_urls(version="latest"):
# regex for the binaries
uname = platform.uname()[4]
processor_architecture = "arm" if uname.startswith("arm") or uname.startswith("aarch") else "amd"
regex = re.compile(r"/jgm/pandoc/releases/download/.*(?:"+processor_architecture+"|x86|mac).*\.(?:msi|deb|pkg)")
regex = re.compile(r"/jgm/pandoc/releases/download/.*(?:"+processor_architecture+r"|x86|mac).*\.(?:msi|deb|pkg)")
# a list of urls to the binaries
pandoc_urls_list = regex.findall(content.decode("utf-8"))
# actual pandoc version
Expand Down

0 comments on commit 31105f1

Please sign in to comment.