|
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_20_1_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 | 180 | remote: Running entrypoint for the VCS package: gunicorn \\(version 20.1.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_20_1_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! |
|
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_20_1_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! |
|
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_20_1_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 | 215 | remote: Running entrypoint for the VCS package: gunicorn \\(version 20.1.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_20_1_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! |
|
318 | 305 | remote: ! patch version automatically and prevent this warning. |
319 | 306 | remote: |
320 | 307 | remote: -----> Installing Python 3.10.0 |
321 | | - remote: -----> Installing pip #{PIP_VERSION}, setuptools #{SETUPTOOLS_VERSION} and wheel #{WHEEL_VERSION} |
| 308 | + remote: -----> Installing pip #{PIP_VERSION} and setuptools #{SETUPTOOLS_VERSION} |
322 | 309 | remote: -----> Installing dependencies using 'pip install -r requirements.txt' |
323 | 310 | remote: Collecting typing-extensions==4.15.0 (from -r requirements.txt (line 2)) |
324 | 311 | remote: Downloading typing_extensions-4.15.0-py3-none-any.whl.metadata (3.3 kB) |
|
378 | 365 | it 'outputs instructions for how to resolve the build failure' do |
379 | 366 | app.deploy do |app| |
380 | 367 | 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. |
| 368 | + remote: ERROR: Failed to build 'GDAL' when getting requirements to build wheel |
382 | 369 | remote: |
383 | 370 | remote: ! Error: Package installation failed since the GDAL library wasn't found. |
384 | 371 | remote: ! |
|
0 commit comments