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 for data_files kwarg #147

Closed
graingert-coef opened this issue Feb 7, 2024 · 3 comments
Closed

support for data_files kwarg #147

graingert-coef opened this issue Feb 7, 2024 · 3 comments

Comments

@graingert-coef
Copy link

input:

setup(
      name="example",
      data_files=[('bitmaps', ['bm/b1.gif', 'bm/b2.gif']),
                  ('config', ['cfg/data.cfg'])],
     )

output:

Traceback (most recent call last):
  File "/Users/thomas/.local/pipx/.cache/f253ae1f378f350/bin/setup-py-upgrade", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/thomas/.local/pipx/.cache/f253ae1f378f350/lib/python3.12/site-packages/setup_py_upgrade.py", line 186, in main
    sections = {k: _reformat(v) for k, v in visitor.sections.items() if v}
                   ^^^^^^^^^^^^
  File "/Users/thomas/.local/pipx/.cache/f253ae1f378f350/lib/python3.12/site-packages/setup_py_upgrade.py", line 154, in _reformat
    new_section[key] = _list_as_str(value)
                       ^^^^^^^^^^^^^^^^^^^
  File "/Users/thomas/.local/pipx/.cache/f253ae1f378f350/lib/python3.12/site-packages/setup_py_upgrade.py", line 143, in _list_as_str
    return '\n' + '\n'.join(lst)
                  ^^^^^^^^^^^^^^
TypeError: sequence item 0: expected str instance, tuple found

data_files is deprecated though - might be nicer to get a different exception though

@asottile
Copy link
Owner

asottile commented Feb 7, 2024

the docs say it's supposed to be a list of strings so I think this might be garbage in garbage out?

@asottile asottile closed this as completed Feb 7, 2024
@graingert-coef
Copy link
Author

@graingert-coef
Copy link
Author

@asottile I got the docs updated on the setuptools side: https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-data-files

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