Skip to content

Commit

Permalink
Bump lxml from 4.9.3 to 5.1.0 (PP-810) (#1602)
Browse files Browse the repository at this point in the history
* Bump lxml from 4.9.3 to 5.1.0

Bumps [lxml](https://github.com/lxml/lxml) from 4.9.3 to 5.1.0.
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](lxml/lxml@lxml-4.9.3...lxml-5.1.0)

---
updated-dependencies:
- dependency-name: lxml
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Add poetry configuration

* Update xmlsec info in README

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Green <jonathan@razzard.com>
  • Loading branch information
dependabot[bot] and jonathangreen authored Mar 13, 2024
1 parent 05aeda0 commit 4cfd5eb
Show file tree
Hide file tree
Showing 7 changed files with 101 additions and 126 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ repos:
hooks:
- id: toml-sort
args: []
files: pyproject.toml
files: pyproject\.toml|poetry\.toml

- repo: https://github.com/jackdewinter/pymarkdown
rev: v0.9.13.4
Expand Down
34 changes: 10 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,19 @@ While you're at it, go ahead and install the following required dependencies:

```sh
brew install pkg-config libffi
brew install libxmlsec1
brew install libjpeg
```

The version of libxmlsec1 (v1.3) that ships with brew is currently not compatible with the python
xmlsec package that we use (for more details see
[this xmlsec issue](https://github.com/xmlsec/python-xmlsec/issues/163)). In order to install a
compatible version of libxmlsec1, you can use the following command:

```sh
brew tap jonathangreen/xmlsec
brew install libxmlsec1@1.2
```

#### Linux

Most distributions will offer Python packages. On Arch Linux, the following command is sufficient:
Expand Down Expand Up @@ -491,29 +500,6 @@ These can be found at `/admin/web/config/SitewideSettings` in the admin interfac
This setting is a toggle that may be used to turn on or off the ability for the the system
to send the Loan and Hold reminders to the mobile applications.

### Installation Issues

When running the `poetry install ...` command, you may run into installation issues. On newer macos machines, you may
encounter an error such as:

```sh
error: command '/usr/bin/clang' failed with exit code 1
----------------------------------------
ERROR: Failed building wheel for xmlsec
Failed to build xmlsec
ERROR: Could not build wheels for xmlsec which use PEP 517 and cannot be installed directly
```

This typically happens after installing packages through brew and then running the `pip install` command.

This [blog post](https://mbbroberg.fun/clang-error-in-pip/) explains and shows a fix for this issue. Start by trying
the `xcode-select --install` command. If it does not work, you can try adding the following to your `~/.zshrc` or
`~/.bashrc` file, depending on what you use:

```sh
export CPPFLAGS="-DXMLSEC_NO_XKMS=1"
```

## Scheduled Jobs

All jobs are scheduled via `cron`, as specified in the `docker/services/simplified_crontab` file.
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ COPY docker/startup /etc/my_init.d/
COPY --chmod=644 docker/services/logrotate /etc/

# Copy our poetry files into the image and install our dependencies.
COPY --chown=simplified:simplified poetry.lock pyproject.toml /var/www/circulation/
COPY --chown=simplified:simplified poetry.lock poetry.toml pyproject.toml /var/www/circulation/
RUN . env/bin/activate && \
poetry install --only main,pg --sync --no-root

Expand Down
5 changes: 3 additions & 2 deletions docker/Dockerfile.baseimage
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ RUN apt-get update && \
apt-get upgrade -y --no-install-recommends -o Dpkg::Options::="--force-confold" && \
/bd_build/cleanup.sh

ARG POETRY_VERSION=1.6.1
ARG POETRY_VERSION=1.7.1

# Install required packages including python, pip, compiliers and libraries needed
# to build the python wheels we need and poetry.
Expand Down Expand Up @@ -53,7 +53,7 @@ RUN useradd -ms /bin/bash -U simplified && \
mkdir /var/log/simplified

WORKDIR /var/www/circulation
COPY --chown=simplified:simplified poetry.lock pyproject.toml /var/www/circulation/
COPY --chown=simplified:simplified poetry.lock poetry.toml pyproject.toml /var/www/circulation/

# Setup virtualenv and install our python dependencies.
# What we install is based on the poetry.lock file in the repo at the time this
Expand All @@ -72,5 +72,6 @@ RUN python3 -m venv env && \
rm -Rf /root/.cache && \
rm pyproject.toml && \
rm poetry.lock && \
rm poetry.toml && \
rm -rf /root/.cache && \
/bd_build/cleanup.sh
Loading

0 comments on commit 4cfd5eb

Please sign in to comment.