Skip to content

Commit dd8b982

Browse files
Corrige o erro ModuleNotFoundError: No module named 'pkg_resources' (solr) (#1364)
* fix: upgrade pysolr version to 3.11.0+ in base requirements * build(prod): ensure setuptools and latest pysolr during wheel build * build(local): add setuptools to fix pkg_resources ModuleNotFoundError
1 parent ae597e2 commit dd8b982

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

compose/local/django/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ COPY ./requirements .
2222
# Update pip
2323
RUN python -m pip install --upgrade pip
2424

25+
# Garante setuptools disponível
26+
RUN pip install --upgrade setuptools
27+
2528
# Create Python Dependency and Sub-Dependency Wheels.
2629
RUN pip wheel --wheel-dir /usr/src/app/wheels \
2730
-r ${BUILD_ENVIRONMENT}.txt

compose/production/django/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ COPY ./requirements .
2222
# Update pip
2323
RUN python -m pip install --upgrade pip
2424

25+
# Garante setuptools disponível
26+
# ==80.10.2
27+
RUN pip install --upgrade setuptools
28+
RUN pip install --upgrade pysolr
29+
2530
# Create Python Dependency and Sub-Dependency Wheels.
2631
RUN pip wheel --wheel-dir /usr/src/app/wheels \
2732
-r ${BUILD_ENVIRONMENT}.txt

requirements/base.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ wagtail-autocomplete==0.12.0
8282

8383
# Solr integration
8484
git+https://github.com/django-haystack/django-haystack.git # Django Haystack
85-
pysolr==3.9.0 # https://pypi.org/project/pysolr/
85+
pysolr>=3.11.0 # https://pypi.org/project/pysolr/
8686

8787
# packtools
8888
# ------------------------------------------------------------------------------

0 commit comments

Comments
 (0)