These 4 ports install the file /usr/local/lib/python2.7/site-packages/backports/__init__.py, causing conflict when users try to install more than one of them: devel/py-backports.functools_lru_cache devel/py-backports.shutil_get_terminal_size security/py-backports.ssl_match_hostname archivers/py-backports.lzma This means that I cannot install ipython and totem on the same system because the former depends on shutil_get_terminal_size and the latter depends on functools_lru_cache. ===> Registering installation for py27-backports.functools_lru_cache-1.4 as automatic Installing py27-backports.functools_lru_cache-1.4... pkg-static: py27-backports.functools_lru_cache-1.4 conflicts with py27-backports.shutil_get_terminal_size-1.0.0 (installs files into the same place). Problematic file: /usr/local/lib/python2.7/site-packages/backports/__init__.py *** Error code 70 Stop. make: stopped in /usr/ports/devel/py-backports.functools_lru_cache
See also question/answer on freebsd-ports (cc post author)
In all four of these, __init__.py does the same thing: __path__ = __import__('pkgutil').extend_path(__path__, __name__) Maybe we can create a separate port just for this file and remove it from the other four?
Installing these from PyPi causes __init__.py to be clobbered with each of these 4 modules but with compatible content.
We could make a separate port for just backports/__init__.py and do this in each of these 4: post-install: @${REINPLACE_CMD} '|backports/__init__.py*|d' ${TMPPLIST}
(In reply to Nikolai Lifanov from comment #4) That is what was proposed (in my response) in the mailing list link added in comment 1
OK, yep, this makes sense. Sorry, I didn't see the mailman link.
(In reply to Nikolai Lifanov from comment #6) No apology necessary, I was just pointing it out explicitly in case it wasn't obvious I'm not sure to what extent that structure might work, but it's worth someone prototyping at least to identify any potential issues.
If the content of these 4 is compatible, I don't see why not. Let's see what the other maintainers might say.
I put up a proposal on Phabricator: https://reviews.freebsd.org/D11095 Can you review this and let me know whether this makes sense and I'll attach this and patches for the 4 ports to this PR.
Canonicalise summary to reflect that all/any "backports" ports will conflict in the same way. Record original list of 4 reported here: devel/py-backports.functools_lru_cache devel/py-backports.shutil_get_terminal_size security/py-backports.ssl_match_hostname archivers/py-backports.lzma Mailing list post: https://lists.freebsd.org/pipermail/freebsd-ports/2017-May/108742.html
Add two more from bug 220749: devel/py-backports.weakref devel/py-backports.shutil
*** Bug 220749 has been marked as a duplicate of this bug. ***
Blocks tensorflow port (bug 219609), see bug 220749 comment 0
Current list of py-backports.* ports: archivers/py-backports.lzma devel/py-backports.csv devel/py-backports.functools_lru_cache devel/py-backports.shutil_get_terminal_size devel/py-backports.weakref security/py-backports.ssl_match_hostname
One way to solve this is to create a single parent package that will only provide __init__.py Upstream: https://bitbucket.org/brandon/backports/issues/6/many-backports-packages-conflict-with-each https://github.com/chrippa/backports.shutil_get_terminal_size/issues/15
Yuri, there is a proposed review in the link above that does just that. I would like some feedback on it or maybe a different approach.
Idea to solve this through the pkg feature: https://lists.freebsd.org/pipermail/freebsd-pkg/2017-July/002222.html
The problem with these specifically is that backports/__init__.py is different in every case: indentation, spacing, comments, etc. However, functionally it's the same thing. I discussed that approach with people briefly and it seems like something not trivial/not desirable to have, but maybe a new discussion can produce different results. The way pip handles it (and other distros) is just allow the clobbering to happen and last installed package wins.
A solution to this has been committed.