Skip to content

Commit 7addea6

Browse files
authored
fix: Fix templates - poetry-plugin-export version and camoufox template name (#952)
### Description Add poetry-plugin-export version constraint <1.9 to make it compatible with already constrained version of poetry <2 (poetry-plugin-export>=1.9 works only with poetry version >=2) Fix incorrect camoufox cookiecutter template name in several template files 'camoufox' -> 'playwright-camoufox' ### Issues - Closes: #951
1 parent fe3817c commit 7addea6

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

src/crawlee/project_template/{{cookiecutter.project_name}}/Dockerfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# You can also use any other image from Docker Hub.
44
# % if cookiecutter.crawler_type == 'playwright'
55
FROM apify/actor-python-playwright:3.13
6-
# % elif cookiecutter.crawler_type == 'camoufox'
6+
# % elif cookiecutter.crawler_type == 'playwright-camoufox'
77
# Currently camoufox has issues installing on Python 3.13
88
FROM apify/actor-python-playwright:3.12
99
# % else
@@ -15,7 +15,7 @@ RUN apt install -yq git && rm -rf /var/lib/apt/lists/*
1515
# % if cookiecutter.package_manager == 'poetry'
1616
RUN pip install -U pip setuptools \
1717
&& pip install 'poetry<2' \
18-
&& poetry self add poetry-plugin-export
18+
&& poetry self add 'poetry-plugin-export<1.9.0'
1919

2020
# Second, copy just poetry.lock and pyproject.toml into the Actor image,
2121
# since those should be the only files that affects the dependency install in the next step,
@@ -67,5 +67,10 @@ COPY . ./
6767
# Use compileall to ensure the runnability of the Actor Python code.
6868
RUN python -m compileall -q .
6969

70+
# % if cookiecutter.crawler_type == 'playwright-camoufox'
71+
# Fetch camoufox files that are always needed when using camoufox.
72+
RUN python -m camoufox fetch
73+
# % endif
74+
7075
# Specify how to launch the source code of your Actor.
7176
CMD ["python", "-m", "{{ cookiecutter.__package_name }}"]

src/crawlee/project_template/{{cookiecutter.project_name}}/_pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# % if cookiecutter.crawler_type == 'camoufox'
1+
# % if cookiecutter.crawler_type == 'playwright-camoufox'
22
# % set extras = ['playwright']
33
# % else
44
# % set extras = [cookiecutter.crawler_type]
@@ -18,7 +18,7 @@ package-mode = false
1818

1919
[tool.poetry.dependencies]
2020
python = "^3.9"
21-
# % if cookiecutter.crawler_type == 'camoufox'
21+
# % if cookiecutter.crawler_type == 'playwright-camoufox'
2222
camoufox = {version= ">=0.4.5", extras = ["geoip"]}
2323
# % endif
2424
# % if cookiecutter.enable_apify_integration

src/crawlee/project_template/{{cookiecutter.project_name}}/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# % if cookiecutter.crawler_type == 'camoufox'
1+
# % if cookiecutter.crawler_type == 'playwright-camoufox'
22
camoufox
33
# % set extras = ['playwright']
44
# % else

0 commit comments

Comments
 (0)