|
163 | 163 | end |
164 | 164 | end |
165 | 165 |
|
166 | | - # This test intentionally uses Python 3.12, so that we test rewriting using older globally installed |
167 | | - # setuptools (which causes .egg-link files to be created too). The Pipenv and Poetry equivalents of |
168 | | - # this test covers the PEP-517/518 setuptools case. |
169 | 166 | context 'when requirements.txt contains editable requirements (both VCS and local package)' do |
170 | 167 | let(:buildpacks) { [:default, 'heroku-community/inline'] } |
171 | 168 | let(:app) { Hatchet::Runner.new('spec/fixtures/pip_editable', buildpacks:) } |
172 | 169 |
|
173 | | - it 'rewrites .pth, .egg-link and finder paths correctly for hooks, later buildpacks, runtime and cached builds' do |
| 170 | + it 'rewrites .pth and finder paths correctly for hooks, later buildpacks, runtime and cached builds' do |
174 | 171 | app.deploy do |app| |
175 | 172 | expect(clean_output(app.output)).to match(Regexp.new(<<~REGEX, Regexp::MULTILINE)) |
176 | 173 | remote: -----> Running bin/post_compile hook |
177 | | - remote: easy-install.pth:/app/.heroku/python/src/gunicorn |
178 | | - remote: easy-install.pth:/tmp/build_.+/packages/local_package_setup_py |
| 174 | + remote: __editable___gunicorn_23_0_0_finder.py:/app/.heroku/python/src/gunicorn/gunicorn'} |
179 | 175 | remote: __editable___local_package_pyproject_toml_0_0_1_finder.py:/tmp/build_.+/packages/local_package_pyproject_toml/local_package_pyproject_toml'} |
180 | | - remote: gunicorn.egg-link:/app/.heroku/python/src/gunicorn |
181 | | - remote: local-package-setup-py.egg-link:/tmp/build_.+/packages/local_package_setup_py |
| 176 | + remote: __editable___local_package_setup_py_0_0_1_finder.py:/tmp/build_.+/packages/local_package_setup_py/local_package_setup_py'} |
182 | 177 | remote: |
183 | 178 | remote: Running entrypoint for the pyproject.toml-based local package: Hello from pyproject.toml! |
184 | 179 | remote: Running entrypoint for the setup.py-based local package: Hello from setup.py! |
185 | | - remote: Running entrypoint for the VCS package: gunicorn \\(version 20.1.0\\) |
| 180 | + remote: Running entrypoint for the VCS package: gunicorn \\(version 23.0.0\\) |
186 | 181 | remote: -----> Saving cache |
187 | 182 | .+ |
188 | 183 | remote: -----> Inline app detected |
189 | | - remote: easy-install.pth:/app/.heroku/python/src/gunicorn |
190 | | - remote: easy-install.pth:/tmp/build_.+/packages/local_package_setup_py |
| 184 | + remote: __editable___gunicorn_23_0_0_finder.py:/app/.heroku/python/src/gunicorn/gunicorn'} |
191 | 185 | remote: __editable___local_package_pyproject_toml_0_0_1_finder.py:/tmp/build_.+/packages/local_package_pyproject_toml/local_package_pyproject_toml'} |
192 | | - remote: gunicorn.egg-link:/app/.heroku/python/src/gunicorn |
193 | | - remote: local-package-setup-py.egg-link:/tmp/build_.+/packages/local_package_setup_py |
| 186 | + remote: __editable___local_package_setup_py_0_0_1_finder.py:/tmp/build_.+/packages/local_package_setup_py/local_package_setup_py'} |
194 | 187 | remote: |
195 | 188 | remote: Running entrypoint for the pyproject.toml-based local package: Hello from pyproject.toml! |
196 | 189 | remote: Running entrypoint for the setup.py-based local package: Hello from setup.py! |
197 | | - remote: Running entrypoint for the VCS package: gunicorn \\(version 20.1.0\\) |
| 190 | + remote: Running entrypoint for the VCS package: gunicorn \\(version 23.0.0\\) |
198 | 191 | REGEX |
199 | 192 |
|
200 | 193 | # Test rewritten paths work at runtime. |
201 | 194 | expect(app.run('bin/test-entrypoints.sh')).to include(<<~OUTPUT) |
202 | | - easy-install.pth:/app/.heroku/python/src/gunicorn |
203 | | - easy-install.pth:/app/packages/local_package_setup_py |
| 195 | + __editable___gunicorn_23_0_0_finder.py:/app/.heroku/python/src/gunicorn/gunicorn'} |
204 | 196 | __editable___local_package_pyproject_toml_0_0_1_finder.py:/app/packages/local_package_pyproject_toml/local_package_pyproject_toml'} |
205 | | - gunicorn.egg-link:/app/.heroku/python/src/gunicorn |
206 | | - local-package-setup-py.egg-link:/app/packages/local_package_setup_py |
| 197 | + __editable___local_package_setup_py_0_0_1_finder.py:/app/packages/local_package_setup_py/local_package_setup_py'} |
207 | 198 |
|
208 | 199 | Running entrypoint for the pyproject.toml-based local package: Hello from pyproject.toml! |
209 | 200 | Running entrypoint for the setup.py-based local package: Hello from setup.py! |
210 | | - Running entrypoint for the VCS package: gunicorn (version 20.1.0) |
| 201 | + Running entrypoint for the VCS package: gunicorn (version 23.0.0) |
211 | 202 | OUTPUT |
212 | 203 |
|
213 | 204 | # Test that the cached .pth files work correctly. |
214 | 205 | app.commit! |
215 | 206 | app.push! |
216 | 207 | expect(clean_output(app.output)).to match(Regexp.new(<<~REGEX, Regexp::MULTILINE)) |
217 | 208 | remote: -----> Running bin/post_compile hook |
218 | | - remote: easy-install.pth:/app/.heroku/python/src/gunicorn |
219 | | - remote: easy-install.pth:/tmp/build_.+/packages/local_package_setup_py |
| 209 | + remote: __editable___gunicorn_23_0_0_finder.py:/app/.heroku/python/src/gunicorn/gunicorn'} |
220 | 210 | remote: __editable___local_package_pyproject_toml_0_0_1_finder.py:/tmp/build_.+/packages/local_package_pyproject_toml/local_package_pyproject_toml'} |
221 | | - remote: gunicorn.egg-link:/app/.heroku/python/src/gunicorn |
222 | | - remote: local-package-setup-py.egg-link:/tmp/build_.+/packages/local_package_setup_py |
| 211 | + remote: __editable___local_package_setup_py_0_0_1_finder.py:/tmp/build_.+/packages/local_package_setup_py/local_package_setup_py'} |
223 | 212 | remote: |
224 | 213 | remote: Running entrypoint for the pyproject.toml-based local package: Hello from pyproject.toml! |
225 | 214 | remote: Running entrypoint for the setup.py-based local package: Hello from setup.py! |
226 | | - remote: Running entrypoint for the VCS package: gunicorn \\(version 20.1.0\\) |
| 215 | + remote: Running entrypoint for the VCS package: gunicorn \\(version 23.0.0\\) |
227 | 216 | remote: -----> Saving cache |
228 | 217 | .+ |
229 | 218 | remote: -----> Inline app detected |
230 | | - remote: easy-install.pth:/app/.heroku/python/src/gunicorn |
231 | | - remote: easy-install.pth:/tmp/build_.+/packages/local_package_setup_py |
| 219 | + remote: __editable___gunicorn_23_0_0_finder.py:/app/.heroku/python/src/gunicorn/gunicorn'} |
232 | 220 | remote: __editable___local_package_pyproject_toml_0_0_1_finder.py:/tmp/build_.+/packages/local_package_pyproject_toml/local_package_pyproject_toml'} |
233 | | - remote: gunicorn.egg-link:/app/.heroku/python/src/gunicorn |
234 | | - remote: local-package-setup-py.egg-link:/tmp/build_.+/packages/local_package_setup_py |
| 221 | + remote: __editable___local_package_setup_py_0_0_1_finder.py:/tmp/build_.+/packages/local_package_setup_py/local_package_setup_py'} |
235 | 222 | remote: |
236 | 223 | remote: Running entrypoint for the pyproject.toml-based local package: Hello from pyproject.toml! |
237 | 224 | remote: Running entrypoint for the setup.py-based local package: Hello from setup.py! |
238 | | - remote: Running entrypoint for the VCS package: gunicorn \\(version 20.1.0\\) |
| 225 | + remote: Running entrypoint for the VCS package: gunicorn \\(version 23.0.0\\) |
239 | 226 | REGEX |
240 | 227 | # Test that the VCS repo checkout was cached correctly. |
241 | | - expect(app.output).to include('Updating /app/.heroku/python/src/gunicorn clone (to revision 20.1.0)') |
| 228 | + expect(app.output).to include(<<~OUTPUT) |
| 229 | + remote: Obtaining gunicorn from git+https://github.com/benoitc/gunicorn@56b5ad87f8d72a674145c273ed8f547513c2b409#egg=gunicorn (from -r requirements.txt (line 5)) |
| 230 | + remote: Skipping because already up-to-date. |
| 231 | + OUTPUT |
242 | 232 | end |
243 | 233 | end |
244 | 234 | end |
|
318 | 308 | remote: ! patch version automatically and prevent this warning. |
319 | 309 | remote: |
320 | 310 | remote: -----> Installing Python 3.10.0 |
321 | | - remote: -----> Installing pip #{PIP_VERSION}, setuptools #{SETUPTOOLS_VERSION} and wheel #{WHEEL_VERSION} |
| 311 | + remote: -----> Installing pip #{PIP_VERSION} and setuptools #{SETUPTOOLS_VERSION} |
322 | 312 | remote: -----> Installing dependencies using 'pip install -r requirements.txt' |
323 | 313 | remote: Collecting typing-extensions==4.15.0 (from -r requirements.txt (line 2)) |
324 | 314 | remote: Downloading typing_extensions-4.15.0-py3-none-any.whl.metadata (3.3 kB) |
|
378 | 368 | it 'outputs instructions for how to resolve the build failure' do |
379 | 369 | app.deploy do |app| |
380 | 370 | expect(clean_output(app.output)).to include(<<~OUTPUT) |
381 | | - remote: note: This error originates from a subprocess, and is likely not a problem with pip. |
| 371 | + remote: ERROR: Failed to build 'GDAL' when getting requirements to build wheel |
382 | 372 | remote: |
383 | 373 | remote: ! Error: Package installation failed since the GDAL library wasn't found. |
384 | 374 | remote: ! |
|
0 commit comments