Skip to content

Commit

Permalink
feat: Pin WeasyPrint 61.2 (ietf-tools#1147)
Browse files Browse the repository at this point in the history
* feat: Pin WeasyPrint 61.2

Fixes ietf-tools#1131

* build: Restrict pydyf to < 0.11.0

pydyf==0.11.0 doesn't work with Python 3.8
  • Loading branch information
kesara authored Jul 18, 2024
1 parent 7776234 commit f743092
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
echo "Installing pip + wheel..."
python -m pip install --upgrade pip wheel
echo "Installing requirements.txt + test dependencies..."
python -m pip install -r requirements.txt tox tox-gh-actions certifi decorator dict2xml pyflakes "pypdf>=4.1.0" "weasyprint>=53.0,!=57.0,!=60.0"
python -m pip install -r requirements.txt tox tox-gh-actions certifi decorator dict2xml pyflakes "pypdf>=4.1.0" "weasyprint==61.2" "pydyf<0.11.0"
- name: Generate Valid Tests
run: |
Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:
echo "Installing pip + wheel..."
python -m pip install --upgrade pip wheel
echo "Installing requirements.txt + test dependencies..."
python -m pip install -r requirements.txt tox tox-gh-actions certifi decorator dict2xml pyflakes "pypdf>=4.1.0" "weasyprint>=53.0,!=57.0,!=60.0"
python -m pip install -r requirements.txt tox tox-gh-actions certifi decorator dict2xml pyflakes "pypdf>=4.1.0" "weasyprint==61.2" "pydyf<0.11.0"
- name: Generate Valid Tests
run: |
Expand Down Expand Up @@ -185,7 +185,7 @@ jobs:
# echo "Installing pip + wheel..."
# python -m pip install --upgrade pip wheel
# echo "Installing requirements.txt + test dependencies..."
# python -m pip install -r requirements.txt tox tox-gh-actions certifi decorator dict2xml pyflakes "pypdf>=4.1.0" "weasyprint>=53.0,!=57.0,!=60.0"
# python -m pip install -r requirements.txt tox tox-gh-actions certifi decorator dict2xml pyflakes "pypdf>=4.1.0" "weasyprint==61.2" "pydyf<0.11.0"
# - name: Generate Valid Tests
# run: |
# make yestests || true
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ In order to generate PDFs, **xml2rfc** uses the [WeasyPrint] module, which depen
2. Next, install WeasyPrint python modules using pip.

```sh
pip install 'weasyprint>=53.0,!=57.0,!=60.0'
pip install xml2rfc[pdf]
```
3. Finally, install the required fonts:
* Download latest fonts from [xml2rfc-fonts](https://github.com/ietf-tools/xml2rfc-fonts/releases/latest).
Expand Down
3 changes: 2 additions & 1 deletion docker/base.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ RUN pip3 install --upgrade \

# Install Python dependencies
RUN pip3 install -r requirements.txt \
"weasyprint>=53.0,!=57.0,!=60.0" \
"weasyprint==61.2" \
"pydyf<0.11.0" \
decorator \
dict2xml \
"pypdf>=3.2.1"
Expand Down
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ console_scripts =
xml2rfc = xml2rfc.run:main

[options.extras_require]
pdf = weasyprint>=53.0,!=57.0,!=60.0
pdf = weasyprint==61.2
pydyf<0.11.0

[bdist_wheel]
universal = 1
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ deps =
decorator
dict2xml
pypdf>=4.1.0
weasyprint>=53.0,!=57.0,!=60.0
weasyprint==61.2
pydyf<0.11.0
2 changes: 1 addition & 1 deletion xml2rfc/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def get_pdf_help(missing_libs=""):
2. Next, install weasyprint python modules using pip.
pip install 'weasyprint>=53.0,!=57.0,!=60.0'
pip install xml2rfc[pdf]
3. Finally, install the required fonts:
* Download latest fonts from xml2rfc-fonts.
Expand Down

0 comments on commit f743092

Please sign in to comment.