Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work around the issue with pip install -e on GitHub Ubuntu runners #216

Merged
merged 1 commit into from
Nov 2, 2022

Conversation

szymonlopaciuk
Copy link
Contributor

Pin the GitHub runners to ubuntu-20.04. Long term solutions should be explored at some point in the future.

This fixes an issue that arises due to the crossover of three different problems:

  1. Ubuntu 22.04 will be used by default on 'ubuntu' runners on GitHub runners (Ubuntu-latest workflows will use Ubuntu-22.04 actions/runner-images#6399).

  2. Ubuntu 22.04 ships with setuptools version 59.x.x, which has a bug that does not allow an --editable installation of packages in --user mode. The flag --user is presumed regardless, as the location with packages is not writable by normal users (see Cannot install into user site directory with editable source. pypa/pip#7953 and https://bugs.launchpad.net/ubuntu/+source/setuptools/+bug/1994016).

  3. We need an --editable installation in order to run tests, as the test_data folder is loaded with respect to the package root, and not the test root (see for example: https://github.com/xsuite/xpart/blob/45d621ad060bc25d361835bde1ed985609a24c49/tests/test_single_rf_harmonic_matcher.py#L25)

Pin the GitHub runners to `ubuntu-20.04`. Long term solutions should be
explored at some point in the future.

This fixes an issue that arises due to the crossover of three different
problems:

1. Ubuntu 22.04 will be used by default on 'ubuntu' runners on GitHub runners
   (actions/runner-images#6399).

2. Ubuntu 22.04 ships with `setuptools` version 59.x.x, which has a bug that
   does not allow an `--editable` installation of packages in `--user` mode.
   The flag `--user` is presumed regardless, as the location with packages is
   not writable by normal users (see pypa/pip#7953
   and https://bugs.launchpad.net/ubuntu/+source/setuptools/+bug/1994016).

3. We need an `--editable` installation in order to run tests, as the
   `test_data` folder is loaded with respect to the package root, and
   not the test root (see for example:
   https://github.com/xsuite/xpart/blob/45d621ad060bc25d361835bde1ed985609a24c49/tests/test_single_rf_harmonic_matcher.py#L25)

Signed-off-by: Szymon Łopaciuk <szymon@lopaciuk.eu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant