Example showing the use of pyproject.toml file
Can namespace packages be created with pyproject.toml files only? I couldn't find any references to these type of packages.
Thank you
Of course you can replace setup.py with pyproject.toml in a namespace package.
This would have to include the following:
[build-system]
requires = ["setuptools", "setuptools-scm"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = ["."]
include = ["example_pkg"]
namespaces = true
[project]
[...]
FYI: https://setuptools.pypa.io/en/latest/userguide/package_discovery.html#finding-namespace-packages
Of course you can replace setup.py with pyproject.toml in a namespace package.
Not necessarily replace, but also augment (as in only putting [build-system] in pyproject.toml and keeping the metadata in setup.py or setup.cfg, or combining all three in some cases).
How about re-framing this request as add pyproject.toml to all examples in the repository?
Though it sounds like it's going to be solved by https://github.com/pypa/sample-namespace-packages/pull/22/files#diff-4f37d08353943ae764c63527530410dc0c1dd92d51af3994532f4a584a73a5e5
How about re-framing this request as add
pyproject.tomlto all examples in the repository?
Yes, I'm in favour of that.
Though it sounds like it's going to be solved by https://github.com/pypa/sample-namespace-packages/pull/22/files#diff-4f37d08353943ae764c63527530410dc0c1dd92d51af3994532f4a584a73a5e5
Although this doesn't transfer the metadata to pyproject.toml. I'd argue that in their current state, these examples are highly setuptools-oriented, do we want that?