pypa / pypa/setuptools

[FR] Multiple call to find_package from setup.cfg

Open
#2,783 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement Needs Triage
Dominant language
Python
Stars
2.9k
Forks
1.4k
Avg merge
1d 1h
Merged PRs (30d)
1

Description

What's the problem this feature will solve?

I am willing to convert from setup.py to setup.cfg a package that does something like the following:

setup(
    packages=find_package() + find_package("ext/"),
)

The first call find the main package and the second find other packages that are distributed along with the main one but not from the same author (and not distributed otherwise).

Describe the solution you'd like

One way that feature could be achieved would be by extending the where keyword from options.packages.find to support a list of roots like that:

[options.packages.find]
where =
    ./
    ./ext

An alternative approach would be to add another level of subsection, possibly specified by a list of labels in the main options sections:

[options]
packages = find: main, external

[options.packages.find.main]
where = ./

[options.packages.find.external]
where = ./ext
Alternative Solutions

No response

Additional context

If that is a feature that may be accepted, I am willing to implement it myself.

Code of Conduct
  • I agree to follow the PSF Code of Conduct

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source files, tests, or entry points are named. Start by reviewing how setup.cfg currently handles options.packages.find and package discovery, then clarify which proposed configuration form should be implemented; done means multiple package roots are supported and the behavior is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.