Replies: 1 comment
-
|
Hi @emlys thank you very much for bringing this point up for discussion. Please see my notes bellow:
I think I disagree with you here. My opinion is the following:
If we were to add all the files regardless of the configuration, then we would see a bunch of transient files being included by accident (e.g. Please note that configurations via
This one depends on the opinion that a person has about the previous topic... Is it worthy to add empty directories to Given these "boundary conditions", I think the current behaviour is reasonable. Please not that it is really trivial to get setuptools to automatically scan the project folder and find the packages/files for you if your package is simple enough. For example, if you don't need any C/C++/Cython extension and stick to a 100% pyproject.toml configuration (no [build-system]
requires = ["setuptools>=63", "setuptools-scm[toml]>=7.0.3"]
build-backend = "setuptools.build_meta"
[project]
name = "myproj"
dependencies = [...]
...
# see https://setuptools.pypa.io/en/latest/userguide/pyproject_config.htmlmost of the times |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Much thanks to @abravalheri and the other maintainers for all the help in these discussions around namespace packages and PEP 420. I'm hoping to get clarification on another angle of this issue.
I understand that any directory can be a python package, whether or not it contains any python code. Given that, there is a behavior of
setuppackagesthat seems counterintuitive to me. Considering these four cases:In all four cases the directory is a package according to python's import mechanism. And all four directories are returned by
find_namespace_packages. This makes sense to me.Then the following behavior seems contradictory. If the contents of setup.py are
then after running
python -m build --wheel, the contents ofbuild/libarecase_3andcase_4were excluded even though they were included inpackagesbar.txtwas excluded fromcase_2I think I would expect that
Therefore I'd expect the non-python files to be included in the distribution by default. I was surprised I needed to specify them with
include_package_dataandpackage_data/MANIFEST.in/setuptools_scm. I am wondering is my understanding correct or is this behavior expected?Beta Was this translation helpful? Give feedback.
All reactions