Opened 10 years ago

Closed 10 years ago

#113 closed task (wontfix)

review: python binding integration

Reported by: jinmei Owned by: jinmei
Priority: medium Milestone: 03. 1st Incremental Release
Component: Unclassified Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity:
Sub-Project: Feature Depending on Ticket:
Estimated Difficulty: Add Hours to Ticket:
Total Hours: Internal?:

Description

I've finally completed the autoconf/automake integration for the C++ python binding. Since this may break trunk or it may be too late for the year1 deliverable, I won't commit the change right now.

Instead I'm attaching a diff to make it possible.

Several specific notes:

  • I renamed the filename of the C++ wrapper from message_python.cc to python_dns.cc, since "message" can be a confusing term.
  • Likewise, I've changed the installed file name.
  • ./configure now needs separte swithces for boost::system and boost::python. --with-boost-system and --with-boost-python. They're enabled by default as long as they are found in search paths.
  • the wrapper .so will be installed bind9's standard library directory. a separate install script will make a symbolic link from bind9's python site-packages directory to the installed .so file.

Please someone review the diff (the diff itself is quite small). I'd leave the decision of whether to incorporate this to year1 to others (Shane and Jeremy?).

Subtickets

Attachments (1)

boost-python.diff (45.7 KB) - added by jinmei 10 years ago.

Download all attachments as: .zip

Change History (5)

Changed 10 years ago by jinmei

comment:1 follow-up: Changed 10 years ago by jinmei

  • Owner changed from shane to jinmei
  • Status changed from new to assigned

Since this patch missed the year1 deadline, I'll make some more cleanups then ask for review again.

comment:2 in reply to: ↑ 1 Changed 10 years ago by jinmei

  • Owner changed from jinmei to UnAssigned

Since this patch missed the year1 deadline, I'll make some more cleanups then ask for review again.

Okay, this work is completed. Please review r1617 (and r1618 and r1619 for minor additional cleanups).

Some additional notes:

  • I've figured out how to install loadable module (.so) directly, so the symblic link trick is now unneeded.
  • I've made some changes to python_dns.cc (renamed from message_python.cc): + removed <string>. At least I didn't need it, and it actually interfered with some boost definitions. + we can't directly pass a pointer to InputBuffer::len_ to PyBytes_AsStringAndSize() due to size mismatch. We could deal with this with an ugly evil reinterpret_cast, but I introduced (IMO) safer fix.

comment:3 Changed 10 years ago by shane

  • Owner changed from UnAssigned to jinmei

Jinmei, has this code been committed?

If so we'll include it as part of the review for ticket #87 (the general Python wrapper review).

If not, then I'll happily assign it to someone. :)

comment:4 Changed 10 years ago by shane

  • Resolution set to wontfix
  • Status changed from assigned to closed

Since Jelte is reimplementing the Python bindings, I'm going to consider this ticket to be overtaken by events.

Jinmei, if you think it is important we can re-open it and make sure we act on it.

Note: See TracTickets for help on using tickets.