Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support package_data with empty key and multiple values #61

Open
hugovk opened this issue Sep 28, 2021 · 3 comments
Open

Support package_data with empty key and multiple values #61

hugovk opened this issue Sep 28, 2021 · 3 comments

Comments

@hugovk
Copy link

hugovk commented Sep 28, 2021

Given setup.py:

from setuptools import setup

setup(package_data={"": ["LICENSE", "NOTICE"]})

Run:

$ setup-py-upgrade .
./setup.py and ./setup.cfg written!

Produces setup.cfg:

[options.package_data]
 =
    LICENSE
    NOTICE

Expected:

[options.package_data]
* =
    LICENSE
    NOTICE

This is similar to #4 (fixed by PR #5), and the simple case still works; this setup.py:

from setuptools import setup

setup(package_data={"": ["LICENSE"]})

Correctly produces this setup.cfg:

[options.package_data]
* =
    LICENSE
@asottile
Copy link
Owner

actually on second thought, I think package_data={'': ...} should be rejected outright

it doesn't appear to work, and even if it did it would pollute the top level with data files

@hugovk
Copy link
Author

hugovk commented Sep 28, 2021

Ah yes, I'm using setuptools_scm anyway so looks like I don't need package_data at all.

@asottile
Copy link
Owner

but it does look like the if statement should be moved -- cc @mxr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants