Skip to content
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

PEP517 in-tree build backend-path support in get-build-requires #1654

Closed
nizox opened this issue Aug 19, 2020 · 2 comments · Fixed by #1655
Closed

PEP517 in-tree build backend-path support in get-build-requires #1654

nizox opened this issue Aug 19, 2020 · 2 comments · Fixed by #1655
Labels
bug:normal affects many people or has quite an impact pr-merged

Comments

@nizox
Copy link

nizox commented Aug 19, 2020

Using tox 3.19, in-tree build with backend-path fails with:

.package start: get-build-requires /Users/nicolas/Workspaces/proj/.tox/.package
setting PATH=/Users/nicolas/Workspaces/proj/.tox/.package/bin:/Users/nicolas/.virtualenvs/proj-python3.8/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
[15159] /Users/nicolas/Workspaces/proj$ /Users/nicolas/Workspaces/proj/.tox/.package/bin/python /Users/nicolas/.virtualenvs/proj-python3.8/lib/python3.8/site-packages/tox/helper/build_requires.py build_package '' >.tox/.package/log/.package-0.log
ERROR: invocation failed (exit code 1), logfile: /Users/nicolas/Workspaces/proj/.tox/.package/log/.package-0.log
=================================================================================== log start ====================================================================================
Traceback (most recent call last):
  File "/Users/nicolas/.virtualenvs/proj-python3.8/lib/python3.8/site-packages/tox/helper/build_requires.py", line 7, in <module>
    backend = __import__(backend_spec, fromlist=["_trash"])
ModuleNotFoundError: No module named 'build_package'

pyproject.toml content is:

[build-system]
requires = [
  "setuptools >= 40.9.0",
  "wheel",
]
build-backend = "build_package"
backend-path = ["scripts"]

A quick patch of tox/helper/build_requires.py to use the backend paths similarly to tox/helper/build_isolated.py fixes the issue. I can do a PR but the patch duplicates the _ensure_module_in_paths function.

@nizox nizox added the bug:normal affects many people or has quite an impact label Aug 19, 2020
@gaborbernat
Copy link
Member

Feel free to add a PR with test 👍

@gaborbernat
Copy link
Member

Released via https://pypi.org/project/tox/3.20.0/

tekumara pushed a commit to seek-oss/aec that referenced this issue Sep 4, 2020
Bumps [tox](https://github.com/tox-dev/tox) from 3.19.0 to 3.20.0.
<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>
<h2>v3.20.0 (2020-09-01)</h2>
<p>Bugfixes
^^^^^^^^</p>
<ul>
<li>Allow hyphens and empty factors in generative section name. - by :user:<code>tyagdit</code>
<code>[#1636](tox-dev/tox#1636) &lt;https://github.com/tox-dev/tox/issues/1636&gt;</code>_</li>
<li>Support for PEP517 in-tree build backend-path key in <code>get-build-requires</code>. - by :user:<code>nizox</code>
<code>[#1654](tox-dev/tox#1654) &lt;https://github.com/tox-dev/tox/issues/1654&gt;</code>_</li>
<li>Allow escaping curly braces in setenv. - by :user:<code>mkenigs</code>
<code>[#1656](tox-dev/tox#1656) &lt;https://github.com/tox-dev/tox/issues/1656&gt;</code>_</li>
</ul>
<p>Features
^^^^^^^^</p>
<ul>
<li>Support for comments within <code>setenv</code> and environment files via the <code>files|</code> prefix. - by :user:<code>gaborbernat</code>
<code>[#1667](tox-dev/tox#1667) &lt;https://github.com/tox-dev/tox/issues/1667&gt;</code>_</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/tox-dev/tox/commit/5c94919b79105eabb0507f6d5e55b60daee11ccc"><code>5c94919</code></a> release 3.20.0</li>
<li><a href="https://github.com/tox-dev/tox/commit/8a25fa6bf3e625c0b47659e1652ab55a79d4d1e8"><code>8a25fa6</code></a> Support environment files and comments in setenv (<a href="https://github-redirect.dependabot.com/tox-dev/tox/issues/1668">#1668</a>)</li>
<li><a href="https://github.com/tox-dev/tox/commit/a7903508fa07068b327e15cfdbf8ea330ab78765"><code>a790350</code></a> New formatters</li>
<li><a href="https://github.com/tox-dev/tox/commit/d4e6e77ea77cf8b336f38313bef40c80b6771139"><code>d4e6e77</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/tox-dev/tox/issues/1656">#1656</a> from mkenigs/escape-braces-in-setenv</li>
<li><a href="https://github.com/tox-dev/tox/commit/8e39dfbb836b6e2e6b2bd637f7b853935e82de3f"><code>8e39dfb</code></a> Spelling fixes (<a href="https://github-redirect.dependabot.com/tox-dev/tox/issues/1665">#1665</a>)</li>
<li><a href="https://github.com/tox-dev/tox/commit/00f6496b756f938db4ddcf040a5192a9e40b16a4"><code>00f6496</code></a> Document allowlist_externals versionadded (<a href="https://github-redirect.dependabot.com/tox-dev/tox/issues/1663">#1663</a>)</li>
<li><a href="https://github.com/tox-dev/tox/commit/3c38762fc6acfd6ca93ddc8607133d3a39e6d25c"><code>3c38762</code></a> Allow escaping curly braces in setenv</li>
<li><a href="https://github.com/tox-dev/tox/commit/3453018dab9a0208f64013c2dd357d1be348ffdf"><code>3453018</code></a> Make setup.py test admonition sterner as it is deprecated (<a href="https://github-redirect.dependabot.com/tox-dev/tox/issues/1660">#1660</a>)</li>
<li><a href="https://github.com/tox-dev/tox/commit/4b7f682db872902b542ccaf26d9619c141dfc8ab"><code>4b7f682</code></a> remove broken link to removed pytest-runner documentation (<a href="https://github-redirect.dependabot.com/tox-dev/tox/issues/1659">#1659</a>)</li>
<li><a href="https://github.com/tox-dev/tox/commit/f292f5236a41f7c02ba60dbc14d8e5941be7ea0e"><code>f292f52</code></a> Fix support of the PEP517 backend-path key (<a href="https://github-redirect.dependabot.com/tox-dev/tox/issues/1655">#1655</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/tox-dev/tox/compare/3.19.0...3.20.0">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.19.0&new-version=3.20.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/configuring-github-dependabot-security-updates)

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>
@tox-dev tox-dev locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug:normal affects many people or has quite an impact pr-merged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants