4

In setup.cfg, I can define

[options.package_data]
myModule =
    '*.csv'

to make sure that data will be installed for my users.

Can I achive the same with pyproject.toml instead?

LudvigH
  • 2,482
  • 2
  • 23
  • 40

2 Answers2

2

if I understand your concern, you are using setuptools as a building and distributing system and you want to move some configs from setup.[py,cfg] namely package_data to pyproject.toml, if so you have to use an other tool to build and distribute your package e.g poetry as stated in @Romibuzi's answer because it's not possible unless the setuptools' team plan a new major release to include a full support of pyproject.toml and then no need for extra/standalone config setup.cfg file.

some references:

cizario
  • 3,582
  • 3
  • 12
  • 25
0

You can use the include directive to do it :

[tool.poetry]
include = ["*.csv"]

https://python-poetry.org/docs/pyproject/#include-and-exclude

Romibuzi
  • 144
  • 6