Skip to content

Commit

Permalink
devel/py-pipdeptree: Fix runtime
Browse files Browse the repository at this point in the history
At runtime the program crashes due to an error like the following:
ImportError: cannot import name '__version__' from 'pipdeptree.version'

Which is caused due to the new template format of the setuptools_scm.
Currently this is just a dirty hack to support older(<7) setuptools_scm
format.

PR:		274101
Reported by:	vedran@miletic.net
  • Loading branch information
5u623l20 committed Oct 18, 2023
1 parent 63e4896 commit 935065c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions devel/py-pipdeptree/Makefile
@@ -1,5 +1,6 @@
PORTNAME= pipdeptree
PORTVERSION= 2.13.0
PORTREVISION= 1
CATEGORIES= devel python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
Expand All @@ -20,4 +21,8 @@ USE_PYTHON= autoplist concurrent pep517 pytest

NO_ARCH= yes

post-patch:
@${REINPLACE_CMD} -e 's|import __version__|import version as __version__|g' \
${WRKSRC}/src/pipdeptree/_cli.py

.include <bsd.port.mk>

0 comments on commit 935065c

Please sign in to comment.