Bug 217419

Summary: New port: level/py-python-dtrace Python bindings for DTrace
Product: Ports & Packages Reporter: Graeme Jenkinson <gcj21>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me CC: swills
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
diff file
none
shar for devel/py-python-dtrace
none
Revised diff file - including patch files directory none

Description Graeme Jenkinson 2017-02-28 14:27:15 UTC
Created attachment 180359 [details]
diff file

New port of python bindings for DTrace. This port has been used in the University of Cambridge's L41 Advanced Operating Systems (http://www.cl.cam.ac.uk/teaching/1617/L41/) course to provide access and post process DTrace outputs in Python.

The eventual aim is to have a teachbsd meta package that includes py-python-dtrace and other dependencies (for Jupyter notebooks). The teachbsd meta package will be used with open sourced teaching materials to teach FreeBSD.
Comment 1 Steve Wills freebsd_committer freebsd_triage 2017-02-28 14:56:09 UTC
Created attachment 180360 [details]
shar for devel/py-python-dtrace

There were a number of issues with this port which I've fixed, see attached updated version. But there's still an issue in that it doesn't compile. The error produced is:

cc -DNDEBUG -O2 -pipe -fstack-protector -fno-strict-aliasing -fPIC -I/sys/cddl/compat/opensolaris -I/sys/cddl/contrib/opensolaris/uts/common -I/usr/src/cddl/contrib/opensolaris/lib/libdtrace/common -I/usr/local/include/python2.7 -c dtrace_cython/consumer.c -o build/temp.freebsd-12.0-CURRENT-amd64-2.7/dtrace_cython/consumer.o
dtrace_cython/consumer.c:434:10: fatal error: 'sys/int_limits.h' file not found
#include "sys/int_limits.h"
         ^
1 error generated.
error: command 'cc' failed with exit status 1
*** Error code 1

I think sys/int_limits.h may be a gcc thing?
Comment 2 Graeme Jenkinson 2017-02-28 15:55:26 UTC
Created attachment 180361 [details]
Revised diff file - including patch files directory

The original diff excluded the files/ directory (as a result of me not adding this in git!).
Comment 3 commit-hook freebsd_committer freebsd_triage 2017-02-28 19:50:56 UTC
A commit references this bug:

Author: swills
Date: Tue Feb 28 19:50:05 UTC 2017
New revision: 435080
URL: https://svnweb.freebsd.org/changeset/ports/435080

Log:
  devel/py-python-dtrace: create port

  DTrace consumer for Python based on libdtrace.

  Currently this package provides two modules: one wraps libdtrace using ctypes.
  The other one uses cython.

  WWW: http://tmetsch.github.com/python-dtrace/

  PR:		217419
  Submitted by:	Graeme Jenkinson <gcj21@cl.cam.ac.uk> (with changes)

Changes:
  head/devel/Makefile
  head/devel/py-python-dtrace/
  head/devel/py-python-dtrace/Makefile
  head/devel/py-python-dtrace/distinfo
  head/devel/py-python-dtrace/files/
  head/devel/py-python-dtrace/files/patch-dtrace__cython_consumer.pyx
  head/devel/py-python-dtrace/files/patch-dtrace__cython_dtrace__h.pxd
  head/devel/py-python-dtrace/files/patch-setup.py
  head/devel/py-python-dtrace/pkg-descr
Comment 4 Steve Wills freebsd_committer freebsd_triage 2017-02-28 19:52:21 UTC
Committed, with slight changes. Thanks!