Bug 211347 - [NEW PORT] devel/py-numba: LLVM optimizing compiler for python and is numpy aware
Summary: [NEW PORT] devel/py-numba: LLVM optimizing compiler for python and is numpy a...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kurt Jaeger
URL:
Keywords: feature, patch-ready
Depends on: 211346
Blocks:
  Show dependency treegraph
 
Reported: 2016-07-24 20:11 UTC by David Kalliecharan
Modified: 2016-09-05 17:20 UTC (History)
3 users (show)

See Also:
pi: maintainer-feedback+


Attachments
py-numba shar archive (1.82 KB, text/plain)
2016-07-24 20:11 UTC, David Kalliecharan
no flags Details
[UPDATED] py-numba shell archive (2.23 KB, text/plain)
2016-07-26 02:00 UTC, David Kalliecharan
no flags Details
poudriere py-numba log (246.38 KB, text/x-log)
2016-07-26 02:00 UTC, David Kalliecharan
no flags Details
[UPDATED] py-numba shell archive (2.24 KB, text/plain)
2016-07-26 12:18 UTC, David Kalliecharan
koobs: maintainer-approval-
Details
[UPDATED] poudriere py-numba log (246.75 KB, text/x-log)
2016-07-26 12:19 UTC, David Kalliecharan
no flags Details
[UPDATED+] py-numba shell archive (189 bytes, text/plain)
2016-07-26 14:28 UTC, David Kalliecharan
no flags Details
[UPDATE+] py-numba shell archive (2.16 KB, text/plain)
2016-07-26 14:43 UTC, David Kalliecharan
no flags Details
[UPDATE+] poudriere py-numba log (246.56 KB, text/x-log)
2016-07-26 14:45 UTC, David Kalliecharan
no flags Details
py-numba shar archive, with included pkg-message (2.70 KB, text/plain)
2016-08-30 19:57 UTC, David Kalliecharan
no flags Details
[UPDATE] py-numba v0.28.1 shar archive (2.17 KB, text/plain)
2016-09-03 20:13 UTC, David Kalliecharan
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Kalliecharan 2016-07-24 20:11:25 UTC
Created attachment 172947 [details]
py-numba shar archive

Numba is a LLVM optimizing compiler for python and in numpy aware, it requires py-llvmlite, which was submitted earlier.
Comment 1 David Kalliecharan 2016-07-24 21:26:22 UTC
Due to an outstanding issue, it appears to be a bug with FreeBSD. In order to properly use Numba currently the user is expected to import numpy first such as,

import numpy
import numba

An issue has been opened up on numba at: 
https://github.com/numba/numba/issues/2001
Comment 2 David Kalliecharan 2016-07-26 02:00:06 UTC
Created attachment 172982 [details]
[UPDATED] py-numba shell archive

Updated port to handle python requirements properly. Tested and passed with ports-mgmt/poudriere. Requires py-llvmlite referenced in Bug 211346.
Comment 3 David Kalliecharan 2016-07-26 02:00:57 UTC
Created attachment 172983 [details]
poudriere py-numba log

Poudriere log which indicates build success for py-numba.
Comment 4 David Kalliecharan 2016-07-26 12:18:33 UTC
Created attachment 172996 [details]
[UPDATED] py-numba shell archive

Added RUN_DEPENDS where necessary
Comment 5 David Kalliecharan 2016-07-26 12:19:28 UTC
Created attachment 172997 [details]
[UPDATED] poudriere py-numba log

Updated poudriere log for py27-numba
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2016-07-26 12:43:44 UTC
Thanks David,

Minor nits (as long as you've already run portlint -AC):

* Remove "Numba is an" from the COMMENT

See: https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/book.html#makefile-comment

* BUILD_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}numpy>1.7:${PORTSDIR}/math/py-numpy

Change to = (its not appending anything) and put it above USES section (after LICENSE as it doesn't need anything that pre.mk provides so goes before the include. This is unlike the conditional RUN_DEPENDS, which uses PYTHON_REL, which *does* need to be after pre.mk.

Also ${PORTSDIR}/ is no longer required for dependency lines

* Unconditional RUN_DEPENDS (llvmlite/argparse) go up top along with other *_DEPENDS
Comment 7 David Kalliecharan 2016-07-26 14:28:04 UTC
Created attachment 173000 [details]
[UPDATED+] py-numba shell archive
Comment 8 David Kalliecharan 2016-07-26 14:43:53 UTC
Created attachment 173002 [details]
[UPDATE+] py-numba shell archive

Thanks for the feedback and help!

I have adjusted the files as you requested, to be more consistent with the Handbook.

Also last attachment was an attempt in elinks and didn't go through as expetced.
Comment 9 David Kalliecharan 2016-07-26 14:45:17 UTC
Created attachment 173003 [details]
[UPDATE+] poudriere py-numba log

poudriere py-numba log, success
Comment 10 David Kalliecharan 2016-07-26 14:47:31 UTC
Comment on attachment 172997 [details]
[UPDATED] poudriere py-numba log

This should be obsolete, forgot to hit the checkbox
Comment 11 David Kalliecharan 2016-07-26 23:01:48 UTC
After consulting with the numba team, it appears that LD_LIBRARY_PATH requires to be set:
LD_LIBRARY_PATH=/usr/local/lib/gcc48
fixes the issue so that a user can just call `import numba` without invoking

import numpy
import numba 

but setting LD_LIBRARY_PATH isn't a preferred solution from what I gather. I will look for possible solutions, postpone the acceptance of this port until this is resolved, or you have a solution for me to add quickly.
Comment 12 Kubilay Kocak freebsd_committer freebsd_triage 2016-07-27 01:18:56 UTC
@David to put an issue on hold, you can obsolete the existing attachments (with comment if needed), so its clear to committers there's nothing to do :)
Comment 13 David Kalliecharan 2016-08-30 19:57:21 UTC
Created attachment 174228 [details]
py-numba shar archive, with included pkg-message

I believe I have found the issue with py-numba, libgcc_s.so.1 is loaded from base, not from gcc48. However I think this might not be handled correctly within numba itself, but I need time to go over it.

A ugly fix is modify /etc/libmap.conf which I have included as pkg-message in the port. Would this be acceptable for now, while I dig around?

Unfortunately, I wasn't able to obsolete any files before, the only way to get the option I found was to go to 'add attachment', but that required another attachment to replace it.
Comment 14 Kurt Jaeger freebsd_committer 2016-09-03 20:03:34 UTC
I'm testbuilding right now.
Comment 15 David Kalliecharan 2016-09-03 20:13:20 UTC
Created attachment 174355 [details]
[UPDATE] py-numba v0.28.1 shar archive

Updated port to latest version. Removed the pkg-message, due to finding out the issue of libgcc_s.so.1 was presented in py-llvmlite (which needs to be updated)
Comment 16 Kurt Jaeger freebsd_committer 2016-09-03 20:16:30 UTC
Thanks, restarted testbuilds (will take a long time to get gcc etc...)
Comment 17 Kurt Jaeger freebsd_committer 2016-09-05 17:17:06 UTC
Testbuilds are fine.
Comment 18 Kurt Jaeger freebsd_committer 2016-09-05 17:18:34 UTC
Committed, thanks!
Comment 19 commit-hook freebsd_committer 2016-09-05 17:20:21 UTC
A commit references this bug:

Author: pi
Date: Mon Sep  5 17:19:22 UTC 2016
New revision: 421379
URL: https://svnweb.freebsd.org/changeset/ports/421379

Log:
  New port: devel/py-numba

  Numba gives you the power to speed up your applications with high performance
  functions written directly in Python. With a few annotations, array-oriented
  and math-heavy Python code can be just-in-time compiled to native machine
  instructions, similar in performance to C, C++ and Fortran, without having to
  switch languages or Python interpreters.

  WWW: http://numba.pydata.org/

  PR:		211347
  Submitted by:	David Kalliecharan <dave@dal.ca>

Changes:
  head/devel/Makefile
  head/devel/py-numba/
  head/devel/py-numba/Makefile
  head/devel/py-numba/distinfo
  head/devel/py-numba/pkg-descr