Bug 265277 - New port: devel/py-fastbencode
Summary: New port: devel/py-fastbencode
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: Nuno Teixeira
URL: https://github.com/breezy-team/fastbe...
Keywords:
Depends on:
Blocks: 265278
  Show dependency treegraph
 
Reported: 2022-07-17 21:07 UTC by fullermd
Modified: 2022-07-21 06:59 UTC (History)
1 user (show)

See Also:


Attachments
New port (2.15 KB, patch)
2022-07-17 21:07 UTC, fullermd
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description fullermd 2022-07-17 21:07:06 UTC
Created attachment 235315 [details]
New port

New port for fast bencode python implementation.  Needed for newer devel/brz versions.
Comment 1 Nuno Teixeira freebsd_committer freebsd_triage 2022-07-19 10:06:36 UTC
Hi,

Doesn't this port depends on ${PYTHON_PKGNAMEPREFIX}cython>0:lang/cython@${PY_FLAVOR}?

setup.py:
---
The python package 'Cython' is not available. If the .c files are available,
they will be built, but modifying the .pyx files will not rebuild them.
---

It builds without cython and question is if port have some advantage of using it.

Cheers
Comment 2 fullermd 2022-07-21 04:27:20 UTC
It should not, no; cython builds .c files from the .pyx files, but the release distfiles (for most python packages) generally prebuild and include them anyway.  And it seems to apply here too:

% find fastbencode-0.0.9/ -name '*pyx*'
fastbencode-0.0.9/fastbencode/_bencode_pyx.c
fastbencode-0.0.9/fastbencode/_bencode_pyx.h
fastbencode-0.0.9/fastbencode/_bencode_pyx.pyx
Comment 3 commit-hook freebsd_committer freebsd_triage 2022-07-21 06:59:00 UTC
A commit in branch main references this bug:

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

commit 9e8e808bde27d8c668b5fe175d09fefd9859a9c7
Author:     Fullermd <fullermd@over-yonder.net>
AuthorDate: 2022-07-21 06:54:41 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2022-07-21 06:54:41 +0000

    devel/py-fastbencode: New port: Fast implementation of bencode

     - submitter becomes maintainer

    fastbencode is an implementation of the bencode serialization format
    originally used by BitTorrent.

    The package includes both a pure-Python version and an optional C
    extension based on Cython. Both provide the same functionality, but the
    C extension provides significantly better performance.

    WWW: https://github.com/breezy-team/fastbencode

    PR:             265277

 devel/Makefile                       |  1 +
 devel/py-fastbencode/Makefile (new)  | 19 +++++++++++++++++++
 devel/py-fastbencode/distinfo (new)  |  3 +++
 devel/py-fastbencode/pkg-descr (new) |  8 ++++++++
 4 files changed, 31 insertions(+)
Comment 4 Nuno Teixeira freebsd_committer freebsd_triage 2022-07-21 06:59:43 UTC
(In reply to fullermd from comment #2)
Thanks for the explanation.

Committed, thanks!