adafruit / adafruit/circuitpython-build-tools

package-folder-prefix quietly excludes libraries without a canonical prefix

Open
#82 5 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
35
Forks
18
PR merge metrics
No merged PRs in 30d

Description

The https://github.com/adafruit/Adafruit_CircuitPython_asyncio library is a package of multiple library files, but its package folder does not start with `adafruit_`: it is simply `asyncio`. Because the package folders are filtered to match the `--package-folder-prefix` argument, which defaults to `adafruit_`, `asyncio` is not included in the adafruit bundle, though it should be.

I could special-case it, and maybe that's the short-term solution. But what is the reason for the existence of `--package_folder_prefix` (which can be a list of multiple prefixes, separated by `, `). Is it just to identify the package folder easily? Would it be better just to skip the directories that we know are not package folders, such as `docs` and `examples`? There should then be only one leftover directory, which is the package folder, if there is a package.

#61 is related, as is [this comment](https://github.com/adafruit/CircuitPython_Community_Bundle/pull/28#pullrequestreview-295259441) by @tannewt that we should use an ignore list instead of an accept list.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing how --package-folder-prefix filters package folders and inspect the handling of directories such as docs and examples. Review issue #61 and the linked pull-request comment for the proposed ignore-list approach; done means the asyncio package is included in the adafruit bundle without incorrectly including non-package directories.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.