Bug 257421 - [NEW PORT] textproc/py-charset-normalizer: Universal Charset Detector. Open, modern alternative to Chardet
Summary: [NEW PORT] textproc/py-charset-normalizer: Universal Charset Detector. Open, ...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL: https://charset-normalizer.readthedoc...
Keywords: feature, needs-qa
Depends on:
Blocks:
 
Reported: 2021-07-26 00:22 UTC by Gabriel Dutra
Modified: 2021-08-20 02:58 UTC (History)
2 users (show)

See Also:
koobs: maintainer-feedback+


Attachments
charset-normalizer (1.33 KB, application/shar)
2021-07-26 00:22 UTC, Gabriel Dutra
0xdutra: maintainer-approval+
Details
fixes applied (1.36 KB, application/shar)
2021-07-26 04:49 UTC, Gabriel Dutra
0xdutra: maintainer-approval+
Details
Added OPTIONS and TEST_DEPENDS (1.64 KB, application/shar)
2021-07-27 03:40 UTC, Gabriel Dutra
0xdutra: maintainer-approval+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabriel Dutra 2021-07-26 00:22:53 UTC
Created attachment 226694 [details]
charset-normalizer

Tested on

FreeBSD: CURRENT amd64, i386
         12.2    amd64, i386

Portlint: no errors
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2021-07-26 01:08:47 UTC
Thank you for submitting a new port Gabriel.

Some review review items:

 - Match upstream short name / summary / show description, modulo portlint requirements. Suggested COMMENT change is this issues current summary (update if required).

 - Match USES=python version spec to upstream (setup.py:REQUIRES in this case)

 - Upstream defines no RUN_DEPENDS (install_requires) (setup.py: REQUIRED = [])

Be careful just copying requirements.txt.

Upstream should have this as a test_requirements.txt  and/or (better): extras_require [ devreqs = { ... , ... } ] so people can just `pip install charset-normalizer[devreqs]`

 - Upstream defines an extras_require, add an OPTION for this, named appropriately (the feature it provides)

 - The package provides tests. Add TEST_DEPENDS and do-test target accordingly.

Tip: For pytest based tests, use the following invocation, which overrides any 'extra stuff' set in setup.cfg:[tool:pytest] and other places. This will remove the need for pycov, in this case:

 do-test:
   @cd ${WRKSRC} && ${PYTHON_CMD} -m pytest -v -rs -o addopts=

Have a run through our Python Packaging guidelines, and confirm if the test suite and poudriere tests pass:

  * https://wiki.freebsd.org/Python/PortsPolicy
  https://docs.freebsd.org/en/books/porters-handbook/testing-poudriere.html
Comment 2 Gabriel Dutra 2021-07-26 04:49:41 UTC
Created attachment 226700 [details]
fixes applied

Hi,

I applied the suggested fixes.
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2021-07-26 06:51:26 UTC
(In reply to Gabriel Dutra from comment #2)

Thanks for the update Gabriel.

- You'll need pytest in TEST_DEPENDS (so its installed at test target time), and 
- Remove the pycov args from addopts= (leaving it empty, ie: '-o addopts='), as we dont want or need coverage tests run downstream.

  cd ${WRKSRC} && ${PYTHON_CMD} -m pytest -v -rs -o oddopts=

Is sufficient.

PS: When you're done providing feedback, set the maintainer-feedback flag (from ? -> +), so you don't get reminder emails  that somethings waiting from you :)
Comment 4 Gabriel Dutra 2021-07-27 03:40:28 UTC
Created attachment 226726 [details]
Added OPTIONS and TEST_DEPENDS

Kocak,

I removed the arguments for 'pycov'. Added OPTIONS to install unicodedata2 library.
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2021-08-20 00:34:16 UTC
Apologies Gabriel, new ports can take some time to get committer. If you're no longer willing to maintain the port, just let us know and we'll reset the MAINTAINER line

The updated patch looks good, thank you for providing that
Comment 6 Gabriel Dutra 2021-08-20 02:58:41 UTC
(In reply to Kubilay Kocak from comment #5)

Sorry, I thought there was a problem with the port. I remain interested in being the maintainer.