Bug 256925 - [NEW PORT]: devel/py-cymbal: Easily add functionality missing from libclang Python bindings
Summary: [NEW PORT]: devel/py-cymbal: Easily add functionality missing from libclang P...
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: Yasuhiro Kimura
URL: https://github.com/CadQuery/cymbal
Keywords: feature, needs-patch, needs-qa
Depends on:
Blocks: 257131
  Show dependency treegraph
 
Reported: 2021-07-01 16:25 UTC by Neal Nelson
Modified: 2021-10-28 08:46 UTC (History)
4 users (show)

See Also:
koobs: maintainer-feedback? (ports)


Attachments
Git diff of new port. (1.58 KB, patch)
2021-07-01 16:25 UTC, Neal Nelson
no flags Details | Diff
Git diff of new port. (1.45 KB, patch)
2021-07-12 13:02 UTC, Neal Nelson
no flags Details | Diff
Git diff of new port. (1.76 KB, patch)
2021-07-12 13:16 UTC, Neal Nelson
no flags Details | Diff
Git diff of new port. (1.45 KB, patch)
2021-07-26 07:51 UTC, Neal Nelson
no flags Details | Diff
Updated patch file (2.89 KB, patch)
2021-10-28 07:13 UTC, Yasuhiro Kimura
ports: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Neal Nelson 2021-07-01 16:25:22 UTC
Created attachment 226156 [details]
Git diff of new port.

This is a simple Python module that will be required by an upcoming update to the currently broken cad/py-cadquery.
Comment 1 Neal Nelson 2021-07-12 13:02:20 UTC
Created attachment 226390 [details]
Git diff of new port.

Update new port to use CHEESESHOP instead of directly using git.
Comment 2 Neal Nelson 2021-07-12 13:16:30 UTC
Created attachment 226393 [details]
Git diff of new port.

Add python pseudo-category.
Comment 3 Steve Wills freebsd_committer freebsd_triage 2021-07-25 21:11:06 UTC
(In reply to Neal Nelson from comment #2)
I think this might be the wrong diff
Comment 4 Neal Nelson 2021-07-26 07:51:37 UTC
Created attachment 226704 [details]
Git diff of new port.

Oops, sorry about that. I have a few ports in the air at the moment, and more to come. Hopefully this is the right diff now.
Comment 5 Neal Nelson 2021-07-27 07:32:03 UTC
I see that you've flagged this for maintainer feedback, after I updated the patch. What else do I need to do?
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2021-07-28 02:37:56 UTC
@Neal

  ? = feedback requested / needed
  + = acknowledged (feedback sent/received) (after your comment 4)

Settinng it from ? to + ensures you dont receive continued email reminders to 'ack  outstanding requests'

Confirmation that the port passes QA (portlint, poudriere at least, package test suite ideally as well), would be great.
Comment 7 Neal Nelson 2021-07-28 07:59:31 UTC
(In reply to Kubilay Kocak from comment #6)

As usual, and as specified in the porter's handbook, I have run the usual tests, portlinted and a poudriere testport. I have no idea what the package test suite is though. Is it documented in the porter's handbook?
Comment 8 Kubilay Kocak freebsd_committer freebsd_triage 2021-08-29 01:52:26 UTC
(In reply to Neal Nelson from comment #7)

'Package test suite' here means the 'upstream test suite' (apologies for not being clear earlier).

In this case upstream has them as:

    tests_require=['unittest2'],
    test_suite='unittest2.collector'

Add TEST_DEPENDS on unittest2 and create a do-test target that:

cd ${WRKSRC} && ${PYTHON_CMD} -m unittest2 discover  (might need 'tests' dir as final arg
Comment 9 Yasuhiro Kimura freebsd_committer freebsd_triage 2021-10-28 07:13:26 UTC
Created attachment 229091 [details]
Updated patch file

* Add TEST_DEPENDS, TEST_TARGET and do-test target
* Connect to ports tree
* Pet portlint
* Reformat Makefile with portfmt
* Reformat pkg-descr so lines aren't longer than 80 characters
Comment 10 Neal Nelson 2021-10-28 07:37:09 UTC
Comment on attachment 229091 [details]
Updated patch file

Sorry about the delay in doing this myself. Well, I have done it but not submitted the change, but it's the same as yours. One test fails, but I've been hoping for some upstream action on this. This doesn't seem to be coming any time soon, so this is as good as it gets for the time being.

The failing test seems to be for a method that's already been added in the library that's being monkey patched, so poses no problem to functionality.
Comment 11 commit-hook freebsd_committer freebsd_triage 2021-10-28 08:42:17 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c5067c3e7ef42ebe1b7ad44cc436371e65d1d913

commit c5067c3e7ef42ebe1b7ad44cc436371e65d1d913
Author:     Neal Nelson <ports@nicandneal.net>
AuthorDate: 2021-10-28 04:20:43 +0000
Commit:     Yasuhiro Kimura <yasu@FreeBSD.org>
CommitDate: 2021-10-28 08:40:42 +0000

    devel/py-cymbal: Add new port

    Cymbal makes it easy to add functionality missing from libclang Python
    bindings

    The Clang libclang python bindings use ctypes to invoke functions
    present in libclang dynamic library. In some cases, only a subset of
    the C functions are available, because the platform or version
    specific Python bindings omit functions. Cymbal simplfies the process
    of dynamically adding those methods to Types and Cursors.

    PR:             256925

 devel/Makefile                  |  1 +
 devel/py-cymbal/Makefile (new)  | 22 ++++++++++++++++++++++
 devel/py-cymbal/distinfo (new)  |  3 +++
 devel/py-cymbal/pkg-descr (new) | 10 ++++++++++
 4 files changed, 36 insertions(+)
Comment 12 Yasuhiro Kimura freebsd_committer freebsd_triage 2021-10-28 08:46:02 UTC
Committed. Thanks!