www/py-adblock: Prepare for py-maturin >= 0.13.0
* Since the 0.13.0 release maturin no longer searches for the Python interpreters by default and uses the current interpreter found in the PATH environment variable. Thus set BINARY_ALIAS to give a specific Python interpreter during build. * Fix build as well if building the port for multiple Python flavors by using FLAVOR_DEFAULT_ALL in poudriere and BUILD_ALL_PYTHON_FLAVORS in the make.conf. * Add CONFLICTS_INSTALL because a shared library is installed outside of Python's site-lib directory. * No bump of PORTREVISION as the package content isn't changed. PR: 266211 (related) Approved by: portmgr (blanket)
This commit is contained in:
parent
cc4726e0c2
commit
8978bbb974
1 changed files with 7 additions and 2 deletions
|
@ -100,6 +100,11 @@ CARGO_BUILD= no
|
|||
CARGO_INSTALL= no
|
||||
CARGO_TARGET_DIR= ${WRKSRC}/target
|
||||
|
||||
CONFLICTS_INSTALL= py3[0-9]-adblock py3[0-9][0-9]-adblock # lib/libadblock.so
|
||||
|
||||
# Required since maturin >= 0.13.0
|
||||
BINARY_ALIAS= python3=${PYTHON_CMD}
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
# This is to prevent Mk/Uses/python.mk do-configure target from firing.
|
||||
|
@ -108,7 +113,7 @@ do-configure:
|
|||
do-build:
|
||||
@(cd ${BUILD_WRKSRC} ; \
|
||||
PSL_PATH="${PREFIX}/share/public_suffix_list/public_suffix_list.dat" \
|
||||
${SETENV} ${MAKE_ENV} maturin build --release ${WITH_DEBUG:D:U--strip})
|
||||
${SETENV} ${MAKE_ENV} maturin-${PYTHON_VER} build --release ${WITH_DEBUG:D:U--strip})
|
||||
|
||||
# Due to upstream not supplying a setup.py file or other way to install
|
||||
# using pip command for now...
|
||||
|
@ -120,7 +125,7 @@ do-install:
|
|||
@(cd ${INSTALL_WRKSRC} ; \
|
||||
${INSTALL_DATA} "target/release/libadblock.so" \
|
||||
"${STAGEDIR}/${PREFIX}/lib" ; \
|
||||
${SETENV} ${MAKE_ENV} pip install --isolated --root=${STAGEDIR} \
|
||||
${SETENV} ${MAKE_ENV} pip-${PYTHON_VER} install --isolated --root=${STAGEDIR} \
|
||||
--ignore-installed --no-deps target/wheels/*.whl)
|
||||
|
||||
post-install:
|
||||
|
|
Loading…
Reference in a new issue