Commit 4622a0b
authored
Fix installing dev build of pyperformance inside compile/compile_all (#232)
The compile and compile_all commands:
- (a) build a fresh Python and `pip` installs `pyperformance` into it.
- (b) for each benchmark, creates a virtual environment and installs
`pyperformance` (and other things) into that.
If hacking on a checkout of `pyperformance`, you want to make sure that it's
installing from the local checkout and never from PyPI or your changes won't be
in effect.
There are two bugs related to this one:
- pyperformance detects if it's a dev version by looking for an
`pyperformance.egg-link` file in `site-packages` [1]. If that's not the case,
pyperformance is installed from PyPI. In step (a), it installs the local
`pyperformance` in non-editable mode, thus no `.egg-link` file, so when (b)
happens, `pyperformance` is installed from PyPI.
- The check for the `.egg-link` file itself is broken, but perhaps because
`toml` changed from a module to a package at one point. It needs to look up a
directory.
[1] https://github.com/python/pyperformance/blob/main/pyperformance/__init__.py#L321 parent d8f76a4 commit 4622a0b
2 files changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
399 | | - | |
| 399 | + | |
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
| |||
0 commit comments