Skip to content

BLD: Remove options.package_data from setup.cfg #46270

Closed
@NickCrews

Description

@NickCrews

Hello! Not sure if this is actually what we want, but I think this can simplify things.

Currently, we include data files in builds in 3 ways:

  1. Listing them in MANIFEST.in
  2. Listing them under options.package_data in setup.cfg
  3. Setting include_package_data = True in setup.cfg

I believe that it is possible (and therefore desirable, as it is more DRY and less spread out) to migrate everything in number 2 to number 1, and still have the same behavior.

This is per both https://setuptools.pypa.io/en/latest/userguide/datafiles.html and from experiments in https://github.com/abravalheri/experiment-setuptools-package-data, where it is shown that if you have include_package_data = True, then MANIFEST.in is sufficient, you don't need options.package_data, both for sdists and wheels.

It looks like include_package_data = True quietly snuck during #38852. Before this, I think the package_data was needed, but now it is not.

A small local test I think showed this to be true, but I might have messed it up so not sure. Probably artifacts from CI would tell the story.

@fangchenli I think you might be the one to look at this? Thank you! See the attached PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    BuildLibrary building on various platforms

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions