setup-py-upgrade
setup-py-upgrade copied to clipboard
Support package_data with empty key and multiple values
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 https://github.com/asottile/setup-py-upgrade/issues/4 (fixed by PR https://github.com/asottile/setup-py-upgrade/pull/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
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
Ah yes, I'm using setuptools_scm
anyway so looks like I don't need package_data
at all.
but it does look like the if statement should be moved -- cc @mxr