-
-
Notifications
You must be signed in to change notification settings - Fork 523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
usedevelop without setup.py failure #2197
Comments
I don't think it's possible to use |
This happens with an env that does not run the tests, I'll see what happens otherwise. |
This works fine when running pytest in the commands of the such an env. @gaborbernat What do you mean by not possible? |
|
From what I can see, the installation works fine with only Have you tried? |
Hmm, did setuptools and pip change this? Can you dig up from pip+setuptools changelog when this was added? I know a while back you could not install in develop mode a package, because the interface was the |
The failures of the PR's CI's jobs seems to be related to what you are saying. Things behave differently on my PC, I'll dig up. |
Just curious, but what's the fix here? Tox should require |
@posita Yes (not considering tox). |
Is this still true, or should this be closed without a fix? |
The PR has been closed without merge. |
I don't think Digging into this a bit, this works (including on the second and subsequent runs): [tox]
# …
skipsdist = true
[testenv]
# …
deps =
--editable . # <-- this works This fails on the second run (per the OP): [tox]
# …
skipsdist = true
[testenv]
# …
usedevelop = True # <-- this works once, then fails on subsequent runs |
Here's a test case: posita/test-case-for-tox-2197. $ tox -e py39,py39-workaround # first run
# …
py39: commands succeeded
py39-workaround: commands succeeded
congratulations :)
$ tox -e py39,py39-workaround # second run
# …
ERROR: py39: InvocationError for command /private/tmp/foo/.tox/py39/bin/python /private/tmp/foo/setup.py --name (exited with code 2)
py39-workaround: commands succeeded |
I am quite interested about fixing this because I already started to remove the historical |
Pip does fix Footnotes
|
I spent the last couple of hours trying to keep coverage working while dropping the broken Apparently almost all repo setups I found implement coverage using tox editable installs. Shortly I cannot drop setup.py without breaking coverage. Did anyone managed to find a configuration where this still works? |
Related: tox-dev/tox#2197
Related: tox-dev/tox#2197
Related: tox-dev/tox#2197
Related: tox-dev/tox#2197
In the end I was able to make it work with ansible/ansible-compat#96 I no longer use pytest-cov as running I am really glad we have a workaround. |
The detection logic for figuring out whether a editable install needs to be reinstalled only works for setuptools based builds using setup.py. If setup.py cannot be found the code will fail with an invocation error. Currently no standard mechanism exists to query a package installed in editable mode whether it should be reinstalled or not. Hence, this change skips reinstallation if setup.py cannot be found. Fixes tox-dev#2197
The detection logic for figuring out whether a editable install needs to be reinstalled only works for setuptools based builds using setup.py. If setup.py cannot be found the code will fail with an invocation error. Currently no standard mechanism exists to query a package installed in editable mode whether it should be reinstalled or not. Hence, this change skips reinstallation if setup.py cannot be found. Fixes tox-dev#2197
379: Bump tox from 3.24.4 to 3.24.5 r=alallema a=dependabot[bot] Bumps [tox](https://github.com/tox-dev/tox) from 3.24.4 to 3.24.5. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/tox-dev/tox/blob/master/docs/changelog.rst">tox's changelog</a>.</em></p> <blockquote> <p>v3.24.5 (2021-12-29) Bugfixes ^^^^^^^^</p> <ul> <li>Fixed an issue where <code>usedevelop</code> would cause an invocation error if setup.py does not exist. -- by :user:<code>VincentVanlaer</code> <code>[#2197](tox-dev/tox#2197) <https://github.com/tox-dev/tox/issues/2197></code>_</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/tox-dev/tox/commit/8cf6330195c078545bcbff52c8d31df12da9944f"><code>8cf6330</code></a> release 3.24.5</li> <li><a href="https://github.com/tox-dev/tox/commit/72e239141d7fbe9f16093f7e1a861eb69ea7e451"><code>72e2391</code></a> Do not reinstall in develop mode without setup.py (<a href="https://github-redirect.dependabot.com/tox-dev/tox/issues/2273">#2273</a>)</li> <li><a href="https://github.com/tox-dev/tox/commit/0985677b6a934c9698a5b9e948417560903889b3"><code>0985677</code></a> Move CI to Github Actions (<a href="https://github-redirect.dependabot.com/tox-dev/tox/issues/2293">#2293</a>)</li> <li><a href="https://github.com/tox-dev/tox/commit/717b7644a2376c0178ad293c41c76ff6631bdc46"><code>717b764</code></a> Fix typos (<a href="https://github-redirect.dependabot.com/tox-dev/tox/issues/2253">#2253</a>)</li> <li><a href="https://github.com/tox-dev/tox/commit/4cf816c97de18dca9d99dc86fec341c1d2c4a20a"><code>4cf816c</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://github-redirect.dependabot.com/tox-dev/tox/issues/2248">#2248</a>)</li> <li><a href="https://github.com/tox-dev/tox/commit/30dbb40f7cce82001b9c269248184057092002dc"><code>30dbb40</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://github-redirect.dependabot.com/tox-dev/tox/issues/2246">#2246</a>)</li> <li><a href="https://github.com/tox-dev/tox/commit/5f2aaf0afbf1d4887b06cebff7acf14c2ed29cad"><code>5f2aaf0</code></a> Declare support for Python 3.10 and update links (<a href="https://github-redirect.dependabot.com/tox-dev/tox/issues/2221">#2221</a>)</li> <li><a href="https://github.com/tox-dev/tox/commit/fed6e7a59158412efc91fdde260b69e698a1d091"><code>fed6e7a</code></a> [pre-commit.ci] pre-commit autoupdate</li> <li><a href="https://github.com/tox-dev/tox/commit/a2370f4ad055cb5d570745d3a06016a7ea76d6cb"><code>a2370f4</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://github-redirect.dependabot.com/tox-dev/tox/issues/2228">#2228</a>)</li> <li><a href="https://github.com/tox-dev/tox/commit/59742ec427bf97cf08eface32c7a58ca8f5c5926"><code>59742ec</code></a> Update changelog.rst</li> <li>Additional commits viewable in <a href="https://github.com/tox-dev/tox/compare/3.24.4...3.24.5">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tox&package-manager=pip&previous-version=3.24.4&new-version=3.24.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) You can trigger a rebase of this PR by commenting ``@dependabot` rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - ``@dependabot` rebase` will rebase this PR - ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it - ``@dependabot` merge` will merge this PR after your CI passes on it - ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it - ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging - ``@dependabot` reopen` will reopen this PR if it is closed - ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [tox](https://github.com/tox-dev/tox) from 3.24.4 to 3.24.5. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/tox-dev/tox/blob/master/docs/changelog.rst">tox's changelog</a>.</em></p> <blockquote> <p>v3.24.5 (2021-12-29) Bugfixes ^^^^^^^^</p> <ul> <li>Fixed an issue where <code>usedevelop</code> would cause an invocation error if setup.py does not exist. -- by :user:<code>VincentVanlaer</code> <code>[#2197](tox-dev/tox#2197) <https://github.com/tox-dev/tox/issues/2197></code>_</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/tox-dev/tox/commit/8cf6330195c078545bcbff52c8d31df12da9944f"><code>8cf6330</code></a> release 3.24.5</li> <li><a href="https://github.com/tox-dev/tox/commit/72e239141d7fbe9f16093f7e1a861eb69ea7e451"><code>72e2391</code></a> Do not reinstall in develop mode without setup.py (<a href="https://github-redirect.dependabot.com/tox-dev/tox/issues/2273">#2273</a>)</li> <li><a href="https://github.com/tox-dev/tox/commit/0985677b6a934c9698a5b9e948417560903889b3"><code>0985677</code></a> Move CI to Github Actions (<a href="https://github-redirect.dependabot.com/tox-dev/tox/issues/2293">#2293</a>)</li> <li><a href="https://github.com/tox-dev/tox/commit/717b7644a2376c0178ad293c41c76ff6631bdc46"><code>717b764</code></a> Fix typos (<a href="https://github-redirect.dependabot.com/tox-dev/tox/issues/2253">#2253</a>)</li> <li><a href="https://github.com/tox-dev/tox/commit/4cf816c97de18dca9d99dc86fec341c1d2c4a20a"><code>4cf816c</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://github-redirect.dependabot.com/tox-dev/tox/issues/2248">#2248</a>)</li> <li><a href="https://github.com/tox-dev/tox/commit/30dbb40f7cce82001b9c269248184057092002dc"><code>30dbb40</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://github-redirect.dependabot.com/tox-dev/tox/issues/2246">#2246</a>)</li> <li><a href="https://github.com/tox-dev/tox/commit/5f2aaf0afbf1d4887b06cebff7acf14c2ed29cad"><code>5f2aaf0</code></a> Declare support for Python 3.10 and update links (<a href="https://github-redirect.dependabot.com/tox-dev/tox/issues/2221">#2221</a>)</li> <li><a href="https://github.com/tox-dev/tox/commit/fed6e7a59158412efc91fdde260b69e698a1d091"><code>fed6e7a</code></a> [pre-commit.ci] pre-commit autoupdate</li> <li><a href="https://github.com/tox-dev/tox/commit/a2370f4ad055cb5d570745d3a06016a7ea76d6cb"><code>a2370f4</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://github-redirect.dependabot.com/tox-dev/tox/issues/2228">#2228</a>)</li> <li><a href="https://github.com/tox-dev/tox/commit/59742ec427bf97cf08eface32c7a58ca8f5c5926"><code>59742ec</code></a> Update changelog.rst</li> <li>Additional commits viewable in <a href="https://github.com/tox-dev/tox/compare/3.24.4...3.24.5">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tox&package-manager=pip&previous-version=3.24.4&new-version=3.24.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
180: Bump tox from 3.24.3 to 3.24.5 r=brunoocasali a=dependabot[bot] Bumps [tox](https://github.com/tox-dev/tox) from 3.24.3 to 3.24.5. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/tox-dev/tox/blob/master/docs/changelog.rst">tox's changelog</a>.</em></p> <blockquote> <p>v3.24.5 (2021-12-29) Bugfixes ^^^^^^^^</p> <ul> <li>Fixed an issue where <code>usedevelop</code> would cause an invocation error if setup.py does not exist. -- by :user:<code>VincentVanlaer</code> <code>[#2197](tox-dev/tox#2197) <https://github.com/tox-dev/tox/issues/2197></code>_</li> </ul> <h2>v3.24.4 (2021-09-16)</h2> <p>Bugfixes ^^^^^^^^</p> <ul> <li>Fixed handling of <code>-e ALL</code> in parallel mode by ignoring the <code>ALL</code> in subprocesses -- by :user:<code>guahki</code>. <code>[#2167](tox-dev/tox#2167) <https://github.com/tox-dev/tox/issues/2167></code>_</li> <li>Prevent tox from using a truncated interpreter when using <code>TOX_LIMITED_SHEBANG</code> -- by :user:<code>jdknight</code>. <code>[#2208](tox-dev/tox#2208) <https://github.com/tox-dev/tox/issues/2208></code>_</li> </ul> <p>Documentation ^^^^^^^^^^^^^</p> <ul> <li>Enabled the use of the favicon in the Sphinx docs first introduced in :pull:<code>764</code> but not integrated fully -- :user:<code>webknjaz</code> <code>[#2177](tox-dev/tox#2177) <https://github.com/tox-dev/tox/issues/2177></code>_</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/tox-dev/tox/commit/8cf6330195c078545bcbff52c8d31df12da9944f"><code>8cf6330</code></a> release 3.24.5</li> <li><a href="https://github.com/tox-dev/tox/commit/72e239141d7fbe9f16093f7e1a861eb69ea7e451"><code>72e2391</code></a> Do not reinstall in develop mode without setup.py (<a href="https://github-redirect.dependabot.com/tox-dev/tox/issues/2273">#2273</a>)</li> <li><a href="https://github.com/tox-dev/tox/commit/0985677b6a934c9698a5b9e948417560903889b3"><code>0985677</code></a> Move CI to Github Actions (<a href="https://github-redirect.dependabot.com/tox-dev/tox/issues/2293">#2293</a>)</li> <li><a href="https://github.com/tox-dev/tox/commit/717b7644a2376c0178ad293c41c76ff6631bdc46"><code>717b764</code></a> Fix typos (<a href="https://github-redirect.dependabot.com/tox-dev/tox/issues/2253">#2253</a>)</li> <li><a href="https://github.com/tox-dev/tox/commit/4cf816c97de18dca9d99dc86fec341c1d2c4a20a"><code>4cf816c</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://github-redirect.dependabot.com/tox-dev/tox/issues/2248">#2248</a>)</li> <li><a href="https://github.com/tox-dev/tox/commit/30dbb40f7cce82001b9c269248184057092002dc"><code>30dbb40</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://github-redirect.dependabot.com/tox-dev/tox/issues/2246">#2246</a>)</li> <li><a href="https://github.com/tox-dev/tox/commit/5f2aaf0afbf1d4887b06cebff7acf14c2ed29cad"><code>5f2aaf0</code></a> Declare support for Python 3.10 and update links (<a href="https://github-redirect.dependabot.com/tox-dev/tox/issues/2221">#2221</a>)</li> <li><a href="https://github.com/tox-dev/tox/commit/fed6e7a59158412efc91fdde260b69e698a1d091"><code>fed6e7a</code></a> [pre-commit.ci] pre-commit autoupdate</li> <li><a href="https://github.com/tox-dev/tox/commit/a2370f4ad055cb5d570745d3a06016a7ea76d6cb"><code>a2370f4</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://github-redirect.dependabot.com/tox-dev/tox/issues/2228">#2228</a>)</li> <li><a href="https://github.com/tox-dev/tox/commit/59742ec427bf97cf08eface32c7a58ca8f5c5926"><code>59742ec</code></a> Update changelog.rst</li> <li>Additional commits viewable in <a href="https://github.com/tox-dev/tox/compare/3.24.3...3.24.5">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tox&package-manager=pip&previous-version=3.24.3&new-version=3.24.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) You can trigger a rebase of this PR by commenting ``@dependabot` rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - ``@dependabot` rebase` will rebase this PR - ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it - ``@dependabot` merge` will merge this PR after your CI passes on it - ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it - ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging - ``@dependabot` reopen` will reopen this PR if it is closed - ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
When
usedevelop
is enabled with a project that only has asetup.cfg
but nosetup.py
, on the second tox execution with no changes at all, tox crashes becauseVirtualEnv._needs_reinstall
relies onsetup.py
to get the name of the project's package.A PR is coming next.
The text was updated successfully, but these errors were encountered: