# PEP 517 build frontends to inform users about wheel basename

**URL:** <https://discuss.python.org/t/pep-517-build-frontends-to-inform-users-about-wheel-basename/1026>\
**Category:** Packaging\
**Created:** [March 14, 2019, 5:46pm UTC](https://discuss.python.org/t/pep-517-build-frontends-to-inform-users-about-wheel-basename/1026 "2019-03-14T17:46:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hroncok](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/hroncok/32/18696_2.png) [@hroncok](https://discuss.python.org/u/hroncok)\
**Post date:** [March 14, 2019, 5:46pm UTC](https://discuss.python.org/t/pep-517-build-frontends-to-inform-users-about-wheel-basename/1026/1 "2019-03-14T17:46:33Z")

</div>

Hey there! As [PEP 517](https://www.python.org/dev/peps/pep-0517/) and [518](https://www.python.org/dev/peps/pep-0518/) are gaining more adoption, we are [looking into](https://bugzilla.redhat.com/show_bug.cgi?id=1685582) ways of using them in Fedora RPM packaging.

Our packages build in sections, one section is responsible for unpacking the sources and applying patches (if any), another section builds the code (traditionally from source to a binary form), another section install the software to the buildroot, another sections is for running the tests etc.

Most importantly, we have the `%build` phase and we use to run `python setup.py build` in it, and we have the `%install` part, where we used to run `python setup.py install --skip-build`.

With PEP 517, we want to run `pip wheel` in `%build` and `pip install` the wheel in `%install`. The problem we have is that while the PEP 517 [build\_wheel hook](https://www.python.org/dev/peps/pep-0517/#build-wheel) returns the basename of the built wheel, pip AFAIK doesn’t share this information any further. We simply don’t know where the built wheel is located. I want to approach pip maintainers and ask them politely to print the information to stdout, so we can read it programmatically. In fact, I think this might be a good addition to the [Recommendations for build frontends (non-normative)](https://www.python.org/dev/peps/pep-0517/#recommendations-for-build-frontends-non-normative).

Does a following addition makes sense?

> A build frontend SHOULD make it possible to programmatically read the basename of built wheel when the `build_wheel` hook is invoked. For example, it might print the information to standard output.

Thanks for feedback.

---

<div class="post-metadata">

**Author:** ![uranusjr](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/uranusjr/32/103_2.png) [@uranusjr](https://discuss.python.org/u/uranusjr)\
**Post date:** [March 14, 2019, 5:53pm UTC](https://discuss.python.org/t/pep-517-build-frontends-to-inform-users-about-wheel-basename/1026/2 "2019-03-14T17:53:41Z")

</div>

There’s a thread on pypa-dev on a similar use case. Maybe it’d be useful.

[https://groups.google.com/forum/m/#!topic/pypa-dev/JIDMwuaoUCE](https://groups.google.com/forum/m/#!topic/pypa-dev/JIDMwuaoUCE)

---

<div class="post-metadata">

**Author:** ![hroncok](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/hroncok/32/18696_2.png) [@hroncok](https://discuss.python.org/u/hroncok)\
**Post date:** [March 14, 2019, 6:15pm UTC](https://discuss.python.org/t/pep-517-build-frontends-to-inform-users-about-wheel-basename/1026/3 "2019-03-14T18:15:57Z")

</div>

Thanks for that link. Eric explicitly asks for the name “without actually building the wheel first”. While I consider that useful as well, that would IMO require another (new) PEP 517 hook (or optional argument to the existing hook). While getting the name when the wheel is built is already part of the API, the information is just not propagated further by pip.

---

<div class="post-metadata">

**Author:** ![pf\_moore](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/pf_moore/32/35_2.png) [@pf\_moore](https://discuss.python.org/u/pf_moore)\
**Post date:** [March 14, 2019, 7:21pm UTC](https://discuss.python.org/t/pep-517-build-frontends-to-inform-users-about-wheel-basename/1026/4 "2019-03-14T19:21:46Z")

</div>

My feeling is that it’s an entirely reasonable feature request for pip, but I don’t think it’s something the PEP should cover. Generally, the PEP is about the interface between frontend and backend, not about the frontend’s UI.

---

<div class="post-metadata">

**Author:** ![dstufft](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/dstufft/32/23_2.png) [@dstufft](https://discuss.python.org/u/dstufft)\
**Post date:** [March 14, 2019, 10:45pm UTC](https://discuss.python.org/t/pep-517-build-frontends-to-inform-users-about-wheel-basename/1026/5 "2019-03-14T22:45:53Z")

</div>

I agree with @pf_moore, it seems like a reasonable feature request for pip, but not something that needs to be added to the PEP itself.

---

<div class="post-metadata">

**Author:** ![encukou](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/encukou/32/2461_2.png) [@encukou](https://discuss.python.org/u/encukou)\
**Post date:** [March 15, 2019, 12:58pm UTC](https://discuss.python.org/t/pep-517-build-frontends-to-inform-users-about-wheel-basename/1026/6 "2019-03-15T12:58:22Z")

</div>

Thank y’all for the response. I filed this as [https://github.com/pypa/pip/issues/6340](https://github.com/pypa/pip/issues/6340).
