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

equvalent for package_data and data_files ? #1839

Open
parmentelat opened this issue Dec 4, 2024 · 0 comments
Open

equvalent for package_data and data_files ? #1839

parmentelat opened this issue Dec 4, 2024 · 0 comments

Comments

@parmentelat
Copy link

I am transitioning some old setup.py-based projects to pyproject.toml and for now I have been using hatchling as a build tool

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

I am facing the issue of translating to hatch 2 constructions that were supported previously with setup.py:

  • package_data : typically to copy over some stuff under the package installed repo
  • data_files: typically to install stuff at some completely other location - think /etc/ or similar

I have read about dealing with the first category using this in pyproject.toml

[tool.setuptools.package_data]
myPackage = [
   "rel/ative/paths"
]

I have played with that, but with mixed success; with some of my projects this works fine but with some others not, with no apparent difference between the 2 use cases
also, about data_files, for now all my attempts have failed with this one

So I guess my first question is maybe just this:
when opting for hatchling as the build tool like I did, can I still leverage these 2 setuptools features like I am trying to do ?
my first understanding was that not, but maybe the answer is more complex than just yes or no, does it depend on other settings ?

I feel like I don't have a clear understanding of how this is supposed to be used...

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

1 participant