question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow to define package source dir in pyproject.toml

See original GitHub issue

Poetry 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:closed
  • Created 5 years ago
  • Reactions:10
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

8reactions
sdispatercommented, Oct 25, 2018

The packages section of the tool.poetry section should address this: https://poetry.eustace.io/docs/pyproject/#packages

0reactions
jacebrowningcommented, Sep 7, 2018

I 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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found