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

Use Python 3.8 for CI builds #988

Merged
merged 4 commits into from
Oct 6, 2023
Merged

Use Python 3.8 for CI builds #988

merged 4 commits into from
Oct 6, 2023

Conversation

achim-k
Copy link
Contributor

@achim-k achim-k commented Oct 4, 2023

Public-Facing Changes

Use Python 3.8 for CI builds

Description

Ensures that Python3.8 is used for CI. This was not the case so far as pipenv was "resetting" the python version:

make lint
  shell: /usr/bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.7.17/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.7.17/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.7.17/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.7.17/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.7.17/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.7.17/x64/lib
SETUPTOOLS_ENABLE_FEATURES="legacy-editable" pipenv install --dev --deploy
Creating a virtualenv for this project...
Pipfile: /home/runner/work/mcap/mcap/python/Pipfile
Using /usr/bin/python3 (3.10.12) to create virtualenv...
created virtual environment CPython3.10.12.final.0-64 in 636ms

Resolves FG-5220

@achim-k achim-k force-pushed the achim/pipfile-pyton-3.7 branch from c69b5a6 to 407409f Compare October 4, 2023 13:54
@achim-k achim-k force-pushed the achim/pipfile-pyton-3.7 branch from 3806667 to c5c9c52 Compare October 5, 2023 12:27
@achim-k achim-k changed the title Pipfile: Set required python version to 3.7 Use Python 3.8 for CI builds Oct 5, 2023
Copy link
Member

@jtbandes jtbandes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for doing this.

Why 3.8 instead of 3.7?

Also why is there a new lint error? 🤔

@achim-k
Copy link
Contributor Author

achim-k commented Oct 6, 2023

Why 3.8 instead of 3.7?

I initially tried with 3.7 but that resulted in various errors due to a deprecated endpoint. (the library mentioned in that answer also requires Python 3.8 now)

Also why is there a new lint error? 🤔

Good question, I'll see if I can find out why these errors (there are more after fixing that one) suddenly appear

@achim-k achim-k enabled auto-merge (squash) October 6, 2023 17:46
@achim-k achim-k merged commit 7f63fd6 into main Oct 6, 2023
24 checks passed
@achim-k achim-k deleted the achim/pipfile-pyton-3.7 branch October 6, 2023 17:49
pezy pushed a commit to pezy/mcap that referenced this pull request Jan 11, 2024
### Public-Facing Changes

Use Python 3.8 for CI builds 

### Description
Ensures that Python3.8 is used for CI. This was not the case so far as
`pipenv` was "resetting" the python version:

```
make lint
  shell: /usr/bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.7.17/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.7.17/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.7.17/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.7.17/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.7.17/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.7.17/x64/lib
SETUPTOOLS_ENABLE_FEATURES="legacy-editable" pipenv install --dev --deploy
Creating a virtualenv for this project...
Pipfile: /home/runner/work/mcap/mcap/python/Pipfile
Using /usr/bin/python3 (3.10.12) to create virtualenv...
created virtual environment CPython3.10.12.final.0-64 in 636ms
```
jtbandes added a commit that referenced this pull request Dec 12, 2024
### Changelog
None

### Docs

None

### Description

CI [broke
recently](https://github.com/foxglove/mcap/actions/runs/12302494967)
because (I think) `ubuntu-latest` changed to `ubuntu-24.04`. The 24.04
image no longer has python 3.7/3.8
(actions/runner-images#10636). It also causes
an error with the `setup-swift` action
(swift-actions/setup-swift#677).

~Our `setup.cfg` declares `python_requires = >=3.7`, however we were
using 3.8 in most CI jobs (#988). I
downgraded these from 3.8 to 3.7 here.~ It was hard to get this working
so I left it at 3.8.

- Included a drive-by lint fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants