Bug 198989 - math/py-numpy: Fails to register dependency on devel/py-nose with non-default python version
Summary: math/py-numpy: Fails to register dependency on devel/py-nose with non-default...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-python (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-28 19:18 UTC by John W. O'Brien
Modified: 2015-07-03 12:21 UTC (History)
3 users (show)

See Also:


Attachments
Depend on nose module instead of executable (588 bytes, patch)
2015-03-28 19:18 UTC, John W. O'Brien
no flags Details | Diff
Depend on nose module instead of executable (503 bytes, patch)
2015-03-31 02:45 UTC, John W. O'Brien
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John W. O'Brien 2015-03-28 19:18:28 UTC
Created attachment 154930 [details]
Depend on nose module instead of executable

devel/py-nose allows concurrent installation, but tailors its plist based on whether it is being built against the default version of python. For example, with

    DEFAULT_VERSIONS=python=2.7 python2=2.7 python3=3.4
    PYTHON_VERSION=python3.4

we see that

    % pkg info -l -F py27-nose-1.3.4.txz | grep bin
            /usr/local/bin/nosetests-2.7
            /usr/local/bin/nosetests
    % pkg info -l -F py34-nose-1.3.4.txz | grep bin
            /usr/local/bin/nosetests-3.4

math/py-numpy depends on devel/py-nose like this:

    RUN_DEPENDS=nosetests:${PORTSDIR}/devel/py-nose

So it cannot detect that the dependency is satisfied when /usr/local/bin/nosetests is not installed.

Without the attached patch:

    % pkg info -d -F py34-numpy-1.9.2,1.txz
    py34-numpy-1.9.2,1:
            blas-3.5.0_3
            gcc-4.8.4_1
            lapack-3.5.0
            py34-setuptools34-5.5.1_1
            python34-3.4.3
            suitesparse-4.0.2_4

With the attached patch:

    % pkg info -d -F py34-numpy-1.9.2_1,1.txz
    py34-numpy-1.9.2_1,1:
            blas-3.5.0_3
            gcc-4.8.4_1
            lapack-3.5.0
            py34-nose-1.3.4
            py34-setuptools34-5.5.1_1
            python34-3.4.3
            suitesparse-4.0.2_4

This may affect other ports too, though some may actually require a "nosetests" executable without the version-specific suffix.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2015-03-29 02:11:39 UTC
Do we know why numpy *depends* on nose at runtime?

Are we sure its not just a TEST_DEPENDS?
Comment 2 Dmitry Sivachenko freebsd_committer freebsd_triage 2015-03-29 09:50:31 UTC
AFAIK py-nose is used only for tests and yesterday I committed a patch to hide this dependency under TESTS option.

The patch proposed in this PR still applies.
Comment 3 John W. O'Brien 2015-03-31 02:45:34 UTC
Created attachment 155038 [details]
Depend on nose module instead of executable
Comment 4 Dmitry Sivachenko freebsd_committer freebsd_triage 2015-07-03 12:20:59 UTC
I fixed dependency for py-nose, thanks!
Comment 5 commit-hook freebsd_committer freebsd_triage 2015-07-03 12:21:18 UTC
A commit references this bug:

Author: demon
Date: Fri Jul  3 12:20:28 UTC 2015
New revision: 391233
URL: https://svnweb.freebsd.org/changeset/ports/391233

Log:
  Depend on a particual file, not an executable so it picks up a correct
  python version.

  PR:		198989
  Submitted by:	John W. O'Brien <john@saltant.com>

Changes:
  head/math/py-numpy/Makefile