Bug 225589 - devel/boost-python-libs: libboost_numpy* is missing from pkg-plist
Summary: devel/boost-python-libs: libboost_numpy* is missing from pkg-plist
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: FreeBSD Office Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-31 15:18 UTC by John Hein
Modified: 2019-06-08 03:18 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (office)


Attachments
[patch] address numpy dependency with explicit option (3.22 KB, patch)
2018-02-03 05:40 UTC, John Hein
no flags Details | Diff
[patch] address numpy dependency with explicit option [v2] (3.06 KB, patch)
2018-02-16 17:48 UTC, John Hein
no flags Details | Diff
[[patch] address numpy dependency with explicit option [v3] (2.84 KB, patch)
2018-04-24 03:42 UTC, John Hein
jcfyecrayz: maintainer-approval? (office)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Hein 2018-01-31 15:18:56 UTC
If you have math/py-numpy installed, then build the devel/boost-python-libs port, check-plist will have the following errors:

====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: lib/libboost_numpy.a
Error: Orphaned: lib/libboost_numpy.so
Error: Orphaned: lib/libboost_numpy.so.%%BOOST_SHARED_LIB_VER%%


One fix would be to make math/py-numpy be a dependency (presumably RUN_ or LIB_, but I haven't checked).  That is a pretty heavy dependency for someone who doesn't want to install numpy.

Another is to make the numpy dependency an option and force the build to not build the libboost_numpy library if that option is off (I don't know the bjam/Boost.Build magic to tell it not to build the boost_numpy lib right now).
Comment 1 John Hein 2018-02-03 05:40:41 UTC
Created attachment 190286 [details]
[patch] address numpy dependency with explicit option

Here is a patch to solve this problem...

- fix plist for devel/boost-python{,3}-libs if math/py-numpy is installed
  by added NUMPY option.  If off, disable building libboost_numpy [1].
  If on, depend on the numpy port [2].  Default: off - matches current packages.

- minor portlint appeasement

PORTREVISION bump is probably not necessary since it will not change the package contents built by default.

[1] There is probably a better way to force disabling the numpy build (arg to bjam?).

[2] Not sure if this should also be a runtime dependency, but ldd does not indicate a dependency.
Comment 2 John Hein 2018-02-16 17:48:36 UTC
Created attachment 190695 [details]
[patch] address numpy dependency with explicit option [v2]

refresh patch after r461885 (flavorize)
Comment 3 John Hein 2018-02-16 17:51:56 UTC
maintainer timeout?
Comment 4 John Hein 2018-04-16 15:07:54 UTC
This is still a problem.  Can someone please commit this?
Comment 5 John Hein 2018-04-24 03:42:35 UTC
Created attachment 192770 [details]
[[patch] address numpy dependency with explicit option [v3]

Refresh patch based on current state of boost and boost-python-lib ports.

- fix plist for devel/boost-python{,3}-libs if math/py-numpy is installed
  by added NUMPY option.  If off, disable building libboost_numpy [1].
  If on, depend on the numpy port [2].  Default: off - matches current packages.

- minor portlint appeasement
Comment 6 Jan Beich freebsd_committer freebsd_triage 2018-09-09 18:42:57 UTC
Option (if non-default) isn't a good approach as it'd prevent ports depending on libboost_numpy. As USE_PYTHON=flavors is incompatible with custom-defined FLAVORS libboost_numpy probably needs to move into a slave port or maybe wait for subpackaging support i.e., one port produces multiple packages.
Comment 7 commit-hook freebsd_committer freebsd_triage 2019-06-08 03:13:51 UTC
A commit references this bug:

Author: jbeich
Date: Sat Jun  8 03:13:23 UTC 2019
New revision: 503700
URL: https://svnweb.freebsd.org/changeset/ports/503700

Log:
  devel/boost-python-libs: add NumPy support

  numpy component is always built but runtime dependency is left out
  until subpackaging to avoid always pulling py-numpy. Consumers should
  add RUN_DEPENDS+=${PYNUMPY} instead to avoid the following:

  ImportError: No module named numpy.core._multiarray_umath
  ImportError: numpy.core._multiarray_umath failed to import

  PR:		225589 238130

Changes:
  head/devel/boost-python-libs/Makefile
  head/devel/boost-python-libs/pkg-plist