pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

wip/py-hkdf: TEST_DEPENDS fails with "don't know how to make generate-wrappers"



(re-imported from security/py-hkdf to wip)

Hi,

while the package source itself does not provide any tests, I am still
trying to figure out what to put into Makefile as to at least avoid
failures when running "make test".

Without any test-related stuff in Makefile, "make test" does run
something (via egg) which happily runs zero tests and returns "OK":

    WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox.
    running egg_info
    writing hkdf.egg-info/PKG-INFO
    writing dependency_links to hkdf.egg-info/dependency_links.txt
    writing top-level names to hkdf.egg-info/top_level.txt
    reading manifest file 'hkdf.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'hkdf.egg-info/SOURCES.txt'
    running build_ext
    
    ----------------------------------------------------------------------
    Ran 0 tests in 0.001s
    
    OK

Fine, no failure.

But without devel/py-nose installed (and with neither TEST_DEPENDS nor
DEPENDS on devel/py-nose), "make test" tries to install nose via pip
and fails:

    running test
    WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox.
    /opt/pkgsrc/bin/python3.8: No module named pip
    error: Command '['/opt/pkgsrc/bin/python3.8', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpcjwv_a8j', '--quiet', 'nose']' returned non-zero exit status 1.
    *** Error code 1

Other packages use a TEST_DEPENDS for py-nose:
    TEST_DEPENDS+=    ${PYPKGPREFIX}-nose-[0-9]*:../../devel/py-nose

so I tried adding that. "make test" will now try to pull in
py-nose but fail with "don't know how to make generate-wrappers".

    => Test dependency py38-nose-[0-9]*: NOT found
    => Verifying package-install for ../../devel/py-nose
    ===> Checking for vulnerabilities in py38-nose-1.3.7
    ===> Overriding tools for py38-nose-1.3.7
    ===> Extracting for py38-nose-1.3.7
    /bin/mv /opt/pkgsrc/work/pkgsrc/devel/py-nose/default/nose-1.3.7/nosetests.1 /opt/pkgsrc/work/pkgsrc/devel/py-nose/default/nose-1.3.7/nosetests3.8.1
    ===> Patching for py38-nose-1.3.7
    => Applying pkgsrc patches for py38-nose-1.3.7
    => Verifying /opt/pkgsrc/usr/pkgsrc/devel/py-nose/patches/patch-aa
    => Applying pkgsrc patch /opt/pkgsrc/usr/pkgsrc/devel/py-nose/patches/patch-aa
    Hmm...  Looks like a unified diff to me...
    The text leading up to this was:
    --------------------------
    |$NetBSD: patch-aa,v 1.4 2015/09/30 13:58:15 jperkin Exp $
    |
    |Use PKGMANDIR.
    |
    |--- setup.py.orig      2011-07-30 23:49:15.000000000 +0000
    |+++ setup.py
    --------------------------
    Patching file setup.py using Plan A...
    Hunk #1 succeeded at 29.
    Hunk #2 succeeded at 106 (offset 4 lines).
    done
    ===> Creating toolchain wrappers for py38-nose-1.3.7
=>  bmake[2]: don't know how to make generate-wrappers. Stop

This looks like a pkgsrc bug to me.

A full DEPENDS would succeed in pulling in and building py-nose:
    DEPENDS+=    ${PYPKGPREFIX}-nose-[0-9]*:../../devel/py-nose

But I don't think running zero tests justifies a full dependency :-)

Is there a better way to indicate absence of tests?

Matthias


Home | Main Index | Thread Index | Old Index