Python: Adjust pinning to be compatible with ortools

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
This commit is contained in:
Magne Sjaastad
2024-10-14 15:05:06 +02:00
parent 0a44f0f6ae
commit f6ab2f92d3
3 changed files with 11 additions and 3 deletions

View File

@@ -91,7 +91,7 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
python -m pip install --upgrade pip 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 - name: Use CMake
uses: lukka/get-cmake@latest uses: lukka/get-cmake@latest

View File

@@ -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

View File

@@ -6,7 +6,7 @@ with open('README.md') as f:
with open('LICENSE') as f: with open('LICENSE') as f:
license = f.read() license = f.read()
RIPS_DIST_VERSION = '2' RIPS_DIST_VERSION = '3'
setup( setup(
name='rips', name='rips',
@@ -19,6 +19,6 @@ setup(
license=license, license=license,
packages=['rips'], packages=['rips'],
package_data={'rips': ['py.typed', '*.py', 'generated/*.py', 'PythonExamples/*.py', 'tests/*.py']}, 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', python_requires='>=3.8',
) )