Skip to content

Commit

Permalink
Python: Adjust pinning to be compatible with ortools
Browse files Browse the repository at this point in the history
ortools is used in the Komodo environment. This environment is not compatible with libprotoc 27 and newer. Use pinning to limit version of libprotoc<27.

Add dependency on typing_extensions
  • Loading branch information
magnesj committed Oct 14, 2024
1 parent 0a44f0f commit 8782b24
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ResInsightWithCache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r GrpcInterface/Python/dev-requirements.txt
pip install -r GrpcInterface/Python/build-requirements.txt
- name: Use CMake
uses: lukka/get-cmake@latest
Expand Down
8 changes: 8 additions & 0 deletions GrpcInterface/Python/build-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
grpcio
grpcio-tools<1.64 # to make sure we use libprotoc 26.1, to display version info use 'python -m grpc_tools.protoc --version'
protobuf>=5.26.1,<5.27 # use same requirements as ortools https://github.com/google/or-tools/blob/stable/ortools/python/setup.py.in
wheel
typing-extensions
pytest
setuptools>=70.0.0 # not directly required, pinned by Snyk to avoid a vulnerability
packaging>=22.0 # https://github.com/pypa/setuptools/issues/4483
4 changes: 2 additions & 2 deletions GrpcInterface/Python/setup.py.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ with open('README.md') as f:
with open('LICENSE') as f:
license = f.read()

RIPS_DIST_VERSION = '2'
RIPS_DIST_VERSION = '3'

setup(
name='rips',
Expand All @@ -19,6 +19,6 @@ setup(
license=license,
packages=['rips'],
package_data={'rips': ['py.typed', '*.py', 'generated/*.py', 'PythonExamples/*.py', 'tests/*.py']},
install_requires=['grpcio', 'protobuf', 'wheel'],
install_requires=['grpcio', 'protobuf', 'wheel', 'typing_extensions'],
python_requires='>=3.8',
)

0 comments on commit 8782b24

Please sign in to comment.