diff options
author | Alessio Sergi <al3hex@gmail.com> | 2018-06-05 14:17:27 +0000 |
---|---|---|
committer | Alessio Sergi <al3hex@gmail.com> | 2018-06-05 14:17:27 +0000 |
commit | 0c06da09e4618ff03ea1faae9c1d3e3863e6fda8 (patch) | |
tree | 37b4b3c1b272e6e5c645a8487734d7cd57d627ae /common/hooks | |
parent | d9f67bcb36290c03a4ecbd6b10718bbc27ca9bd1 (diff) | |
download | void-packages-0c06da09e4618ff03ea1faae9c1d3e3863e6fda8.tar void-packages-0c06da09e4618ff03ea1faae9c1d3e3863e6fda8.tar.gz void-packages-0c06da09e4618ff03ea1faae9c1d3e3863e6fda8.tar.bz2 void-packages-0c06da09e4618ff03ea1faae9c1d3e3863e6fda8.tar.lz void-packages-0c06da09e4618ff03ea1faae9c1d3e3863e6fda8.tar.xz void-packages-0c06da09e4618ff03ea1faae9c1d3e3863e6fda8.tar.zst void-packages-0c06da09e4618ff03ea1faae9c1d3e3863e6fda8.zip |
Revert "common/hooks: add hook to check python dependencies"
This reverts commit 3b1f5272b95ec89ea331767d8c7a8143c43b24ae.
Diffstat (limited to 'common/hooks')
-rw-r--r-- | common/hooks/pre-pkg/07-python-requires.sh | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/common/hooks/pre-pkg/07-python-requires.sh b/common/hooks/pre-pkg/07-python-requires.sh deleted file mode 100644 index 007fa4aac7d..00000000000 --- a/common/hooks/pre-pkg/07-python-requires.sh +++ /dev/null @@ -1,52 +0,0 @@ -# This hook executes the following tasks: -# - checks if python requires are satisfied - -hook() { - local requires= pver= req= reqname= modules= module= cmp=; - - if [ -e "$wrksrc/requirements.txt" ]; then - requires=$(grep -v "^#.*" "$wrksrc/requirements.txt") - elif [ -e "$wrksrc/setup.py" ]; then - pver=${python_versions%% *} - requires=$( ( cd "$wrksrc"; python$pver -c 'import setup; print("\n".join(setup.params["install_requires"]))') ) - else - return 0 - fi - - # reads all dependencies and creates a list of modules - modules=$(for dep in $depends; do - ( - local _name= - - setup_pkg "$dep" "$XBPS_CROSS_BUILD" ignore-problems - if [ -h "$XBPS_SRCPKGDIR/${pkgname}" ]; then - "${pkgname}_package" - fi - - printf "%s:%s:" ${pkgname}-${version}_${revision} "$pkgname" - for _name in ${pycompile_module}; do - _name="${_name//\//.}" - printf "%s:" "${_name%.py}" - done - echo - ) - done) - - # checks if all requires are satisfied by the depending modules - for i in $requires; do - req=${i/;*/} - if ! reqname="$($XBPS_UHELPER_CMD getpkgdepname "${req}")"; then - reqname=$_tmpreq - fi - - if ! module=$(echo "$modules" | grep ":$reqname:"); then - msg_warn "Python Dependency $req not found\n" - msg_warn " Full pattern: ${i}\n" - continue - fi - cmp=$(echo "$req" | sed "s/[^<>=]*/$($XBPS_UHELPER_CMD getpkgname "${module%%:*}")/") - if $XBPS_UHELPER_CMD pkgmatch "${module%%:*}" "$cmp"; then - msg_warn "Python Dependency version mismatch: $cmp => ${module%%:*}\n" - fi - done -} |