pkgsrc-Users archive

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

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



Matthias Ferdinand <mf+ml.pkgsrc-users%netzwerkagentursaarland.de@localhost>
writes:

> 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":

Stepping back and being perhaps too hasty, some statements whose
true/false status is relevant but not clearly known to me:

  there is a python-world rule that all things that use egg.mk must have
  tests

  all eggs are expected to depend on py-nose for tests and thus it
  should be part of the framekwork

  hkdf is buggy about these rules

  pkgsrc is wrong to assume that all python modules have tests.
  (Reading extension.mk, it seems there is a way to turn that off, but
  it's not documented, and I don't understand the preferred approach.)
  It is likely a good assumption that having tests is the default.


I wonder if we want PYTHON_NO_TEST=yes, or if that should be expressed
by (and thus hinted at in extension.mk):
  # This package does not have any tests.
  TEST_TARGET=
which I think will omit the implicit tests rule being added.

>     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.

Which makes me wonder if our extension.mk test target has aged out of
being the python way.

> 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

It would be a bug if it worked; packages aren't supposed to reach out to
the net or invoke other packaging systems.[

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

Maybe this should be declarative within the egg.mk world.

> 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".

>     ===> Creating toolchain wrappers for py38-nose-1.3.7
> =>  bmake[2]: don't know how to make generate-wrappers. Stop

For me, it gets much further:

  => Checking file-check results for py38-nose-1.3.7
  sh: cannot create /tmp/work/devel/py-nose/work/.error/check-files-prefix: directory nonexistent

but still not ok.  (I have PKG_DEVELOPER=yes, for what that's worth.)

> This looks like a pkgsrc bug to me.

Agreed.

> 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 :-)

Agreed.

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index