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

Support PEP517 in-tree build backend #1575

Closed
webknjaz opened this issue May 6, 2020 · 5 comments · Fixed by #1614
Closed

Support PEP517 in-tree build backend #1575

webknjaz opened this issue May 6, 2020 · 5 comments · Fixed by #1614
Labels
feature:new something does not exist yet, but should pr-merged

Comments

@webknjaz
Copy link
Contributor

webknjaz commented May 6, 2020

I'm getting

ERROR: invocation failed (exit code 1), logfile: ~/src/github/ansible/pylibssh/.tox/.package/log/.package-2.log
=================================== log start ====================================
Traceback (most recent call last):
  File "~/.pyenv/versions/3.7.1/lib/python3.7/site-packages/tox/helper/build_requires.py", line 7, in <module>
    backend = __import__(backend_spec, fromlist=[None])
ModuleNotFoundError: No module named 'pep517_backend'

because of

$ cat pyproject.toml                            
[build-system]
...
backend-path = ["bin"]  # requires 'Pip>=20' or 'pep517>=0.6.0'
build-backend = "pep517_backend"

and

$ ls -l bin/pep517_backend.py      
-rw-r--r-- 1 me me 6.2K May  5 00:43 bin/pep517_backend.py

I think this should be considered a bug. Pip supports it starting v20 and pep517 supports it with v0.7 or so.

@webknjaz webknjaz added the bug:normal affects many people or has quite an impact label May 6, 2020
@gaborbernat
Copy link
Member

gaborbernat commented May 7, 2020

I'll add it onto the tox 4 pile. Feel free to put in a PR if you want it for 3. I consider this more a feature request though as in-tree build backends were added later to PEP-517.

@gaborbernat gaborbernat added feature:new something does not exist yet, but should and removed bug:normal affects many people or has quite an impact labels May 7, 2020
@webknjaz
Copy link
Contributor Author

webknjaz commented May 7, 2020

Yeah, I've done some research and it doesn't look super hard. Except that I cannot figure out how tox resets PYTHONPATH that I pass via env in calls to popen to "src".

@webknjaz
Copy link
Contributor Author

webknjaz commented Jul 13, 2020

@gaborbernat by the way, any reason to not rely on pep517 package from PyPI instead of having own implementation?

@helpr helpr bot added the pr-available label Jul 13, 2020
webknjaz added a commit to webknjaz/tox that referenced this issue Jul 13, 2020
webknjaz added a commit to webknjaz/tox that referenced this issue Jul 13, 2020
@gaborbernat
Copy link
Member

gaborbernat commented Jul 14, 2020

@gaborbernat by the way, any reason to not rely on pep517 package from PyPI instead of having own implementation?

Speed, maintainability. pep517 is designed to run every time from scratch, and not to reuse the build environment. We have a good way to cache pyhton environments ourselves though.

webknjaz added a commit to webknjaz/tox that referenced this issue Jul 14, 2020
webknjaz added a commit to webknjaz/tox that referenced this issue Jul 14, 2020
webknjaz added a commit to webknjaz/tox that referenced this issue Jul 27, 2020
webknjaz added a commit to webknjaz/tox that referenced this issue Jul 27, 2020
webknjaz added a commit to webknjaz/tox that referenced this issue Jul 28, 2020
@helpr helpr bot added pr-merged and removed pr-available labels Jul 30, 2020
@gaborbernat
Copy link
Member

gaborbernat commented Aug 6, 2020

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

webknjaz added a commit to ansible/pylibssh that referenced this issue Aug 10, 2020
This change makes sure that the in-tree PEP517 build backend of this
project is picked up and used by tox.

Fixes #72.

Refs:
* tox-dev/tox#1575
* tox-dev/tox#1614
@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
feature:new something does not exist yet, but should pr-merged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants