Include all non .py file on pyproject.toml with setuptools_scm

246 Views Asked by At

I am having trouble getting setuptools to want to include non .py files when installing the package with pip install.

My pyproject.toml file looks like this

[build-system]
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"

[project]
name = "ltpy"
dynamic = ["version"]
readme = "README.md"
requires-python = ">=3.7"
classifiers = [
    "Programming Language :: Python :: 3",
]

dependencies = []

[tool.setuptools_scm]
write_to = "automation/ltpy/_version.py"
root= "../../"

[tool.setuptools]
include-package-data = true

[tool.setuptools.packages.find]
where = ["ltpy"]

and my folder structure looks like this

lt
|--automation
   |-- ltpy
       |-- ltpy
           |-- __init__.py
           |-- extra_file.pem
       |-- pyptoject.toml

I would like the "extra_file.pem" to be included on the package install, hence the inclusion of "include-package-data = true" As far as I can tell setuptools_scm has a find_files that could be used to do this but I can't find any example of this. Can someone help me to understand what is needed to make this work?

0

There are 0 best solutions below