Is there a way for a package to recognize that its content clashes with that of another package? This can happen when a package becomes unmaintained and another differently named package takes over with perhaps clashing modules/__package__ paths. -- Robin Becker
It is possible, but in practice there are some complications. There is not an established way to map packages to files they install, so it’d be very difficult to answer the generic question “is there another package that install the same things as mine does” (except you crawl the whole PyPI). Here’s a similar request: https://github.com/pypa/warehouse/issues/5375 It is more plausible, on the other hand, when given two packages, to answer whether they would install conflicting files. This is still complicated by the fact that setup.py can do literally anything, and there is no theoretical way to be 100% sure until you actually install it, but it is possible to make a (very) educated guess via wheels. Each .whl archive contains a RECORD file <https://www.python.org/dev/peps/pep-0427/#the-dist-info-directory> that lists files to copy, so you can compare them to know whether conflicts exist. TP
On 19/2/2019, at 20:07, Robin Becker <robin@reportlab.com> wrote:
Is there a way for a package to recognize that its content clashes with that of another package? This can happen when a package becomes unmaintained and another differently named package takes over with perhaps clashing modules/__package__ paths. -- Robin Becker -- Distutils-SIG mailing list -- distutils-sig@python.org To unsubscribe send an email to distutils-sig-leave@python.org https://mail.python.org/mailman3/lists/distutils-sig.python.org/ Message archived at https://mail.python.org/archives/list/distutils-sig@python.org/message/ZXAFK...
participants (2)
-
Robin Becker
-
Tzu-ping Chung