Allow to define package source dir in pyproject.toml
See original GitHub issuePoetry has the convention of the package title being the same as the package dir name. However, this is not always the desired behavior.
Here’s an example of a package called foliantcontrib.includes
which is in fact exports foliant.preprocessors.includes
module. In setup.py
, package name and the names of the exported packages are independent: https://github.com/foliant-docs/foliantcontrib.includes/blob/develop/setup.py#L23.
Poetry could have an option src
that would point to the source code path within the project path. By the way, this could be an alternative way to support src layout: you’d just set src: src/mypackage
.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:10
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Configuring setuptools using pyproject.toml files
Starting with PEP 621, the Python community selected pyproject.toml as a standard way of specifying project metadata. Setuptools has adopted this standard ...
Read more >A Practical Guide to Setuptools and Pyproject.toml
An example driven guide to setting up and building a python package using Setuptools together with pyproject.toml.
Read more >The pyproject.toml file | Documentation | Poetry
Poetry is clever enough to detect Python subpackages. Thus, you only have to specify the directory where your root package resides. include and...
Read more >My How and Why: pyproject.toml & the 'src' Project Structure
I hadn't paid close enough attention to the instructions in Hynek's article for the src layout conversion, and had failed to set package_dir...
Read more >pyproject.toml - Martin Thoma
The pyproject.toml file allows package creators to define the build system as a dependency as well as a projects metadata.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The
packages
section of thetool.poetry
section should address this: https://poetry.eustace.io/docs/pyproject/#packagesI think it’s fairly common for the PyPI name and package name to be different.
https://pypi.org/project/minilog/ is used as
import log
.Can this library be developed using Poetry?