Title: Editable installation isn't working properly · Issue #319 · python/pyperformance · GitHub
Open Graph Title: Editable installation isn't working properly · Issue #319 · python/pyperformance
X Title: Editable installation isn't working properly · Issue #319 · python/pyperformance
Description: If pyperformance is installed as editable pip install -e . from the git repository, it doesn't work when invoked $ /tmp/tmpdir/prefix/bin/python3 -u -m pyperformance ERROR: pyperformance should not be run without installing first (consid...
Open Graph Description: If pyperformance is installed as editable pip install -e . from the git repository, it doesn't work when invoked $ /tmp/tmpdir/prefix/bin/python3 -u -m pyperformance ERROR: pyperformance should not...
X Description: If pyperformance is installed as editable pip install -e . from the git repository, it doesn't work when invoked $ /tmp/tmpdir/prefix/bin/python3 -u -m pyperformance ERROR: pyperformance should...
Opengraph URL: https://github.com/python/pyperformance/issues/319
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Editable installation isn't working properly","articleBody":"If pyperformance is installed as editable `pip install -e .` from the git repository, it doesn't work when invoked\r\n\r\n```\r\n$ /tmp/tmpdir/prefix/bin/python3 -u -m pyperformance \r\nERROR: pyperformance should not be run without installing first \r\n(consider using the dev.py script) \r\n```\r\n\r\nThe check is done by[ is_installed()](https://github.com/python/pyperformance/blob/main/pyperformance/__init__.py#L13C5-L13C17) which calls both `_is_dev()` and `_is_devel_install()` which are both broken.\r\n\r\nThe function [is_dev()](https://github.com/python/pyperformance/blob/main/pyperformance/__init__.py#L21) bases the logic on the presence of `setup.py` which is long gone.\r\n\r\nThe function [_is_devel_install()](https://github.com/python/pyperformance/blob/main/pyperformance/__init__.py#L32) instead check the presence of `pyperformance.egg-link` in the site-packages.\r\n\r\nIn my installation I have:\r\n* `pyperformance.egg-info` directory in the git repository\r\n* `__editable___pyperformance_1_0_9_finder.py`, `__editable__.pyperformance-1.0.9.pth`, `pyperformance-1.0.9.dist-info` in the site-packages\r\n\r\nI'm trying to invoke pyperformance using a dev instance via \r\n\r\n```\r\npython3.12 /work/oss/repos/pyperformance/dev.py compile_all benchmark.conf\r\n```\r\nand it will fail eventually:\r\n\r\n```\r\n2023-10-19 15:25:52,049: Building wheels for collected packages: pyperformance \r\n2023-10-19 15:25:52,050: Building editable for pyperformance (pyproject.toml): started \r\n2023-10-19 15:25:52,885: Building editable for pyperformance (pyproject.toml): finished with status 'done' \r\n2023-10-19 15:25:52,888: Created wheel for pyperformance: filename=pyperformance-1.0.9-0.editable-py3-none-any.whl size=6710 sha256=159fbc3f13ae47399e04d5f7cdf5e024c3652b2ed91096f8638844238e005c0d \r\n2023-10-19 15:25:52,888: Stored in directory: /tmp/pip-ephem-wheel-cache-ubyuatck/wheels/0d/04/cb/add3bede8e376e8789c834f334f1834467606bde2625d5a4ad \r\n2023-10-19 15:25:52,896: Successfully built pyperformance \r\n2023-10-19 15:25:52,922: Installing collected packages: psutil, packaging, pyperf, pyperformance \r\n2023-10-19 15:25:53,307: Successfully installed packaging-23.2 psutil-5.9.6 pyperf-2.6.1 pyperformance-1.0.9 \r\n2023-10-19 15:25:53,437: + /tmp/tmpdir/prefix/bin/python3 -u -m pyperformance venv recreate --venv /tmp/tmpdir/venv --benchmarks '\u003cNONE\u003e' \r\n2023-10-19 15:25:53,514: ERROR: pyperformance should not be run without installing first \r\n2023-10-19 15:25:53,515: (consider using the dev.py script) \r\n2023-10-19 15:25:53,523: Command /tmp/tmpdir/prefix/bin/python3 -u -m pyperformance venv recreate --venv /tmp/tmpdir/venv --benchmarks '\u003cNONE\u003e' failed with exit code 1 \r\n2023-10-19 15:25:53,565: Command /work/oss/ENTLLT-6897/venv3.12/bin/python -m pyperformance compile /work/oss/repos/ci-scripts/projects/python/benchmark.conf be5e8a010341c4d2d28ef53a1baed402ee06466e main --no-update --no-tune failed with exit code 11 \r\n2023-10-19 15:25:53,565: Benchmark exit code: 11 \r\n2023-10-19 15:25:53,566: FAILED: main-be5e8a010341c4d2d28ef53a1baed402ee06466e \r\n```","author":{"url":"https://github.com/diegorusso","@type":"Person","name":"diegorusso"},"datePublished":"2023-10-19T16:54:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/319/pyperformance/issues/319"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:38db3f29-357e-3e8f-f38e-2690b3e54718 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8E6C:137035:1369E35:1B2EB70:696A34AC |
| html-safe-nonce | d00f4f01fb86eaceba7ad3655d37d12e161ebd9d78d848370b2a7d31aa51961f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RTZDOjEzNzAzNToxMzY5RTM1OjFCMkVCNzA6Njk2QTM0QUMiLCJ2aXNpdG9yX2lkIjoiNzE4NzUyMDQzMTgwMTkwNjM0OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7cf87d25e81c81eb5181deb41625e9fba5035219dd3ce4210044da7daf13ef4f |
| hovercard-subject-tag | issue:1952697718 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/pyperformance/319/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2f893b3bf088d22e270cbd5d0b8b434db225e22ba273cd58614ca3e2d2f4b28f/python/pyperformance/issues/319 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2f893b3bf088d22e270cbd5d0b8b434db225e22ba273cd58614ca3e2d2f4b28f/python/pyperformance/issues/319 |
| og:image:alt | If pyperformance is installed as editable pip install -e . from the git repository, it doesn't work when invoked $ /tmp/tmpdir/prefix/bin/python3 -u -m pyperformance ERROR: pyperformance should not... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | diegorusso |
| hostname | github.com |
| expected-hostname | github.com |
| None | 321736bfdb3f591415ae895a0459bec204b26a76caf47ba5c980634cfacc4538 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/pyperformance git https://github.com/python/pyperformance.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 65949828 |
| octolytics-dimension-repository_nwo | python/pyperformance |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 65949828 |
| octolytics-dimension-repository_network_root_nwo | python/pyperformance |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7a9163cefd1ea4bd06f8eb7c082f43e4e53f626f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width