Skip to content

Instantly share code, notes, and snippets.

@alex-oleshkevich
Last active February 2, 2021 23:15
Show Gist options
  • Save alex-oleshkevich/4edd4bee8713fb52338a23d9a4d83697 to your computer and use it in GitHub Desktop.
Save alex-oleshkevich/4edd4bee8713fb52338a23d9a4d83697 to your computer and use it in GitHub Desktop.
├── libs
│   ├── module1_src
│   │   ├── namespace
│   │   └── pyproject.toml
│   ├── module2_src
│   │   ├── namespace
│   │   └── pyproject.toml
│   ├── module3_src
│   │   ├── namespace
│   │   └── pyproject.toml
│   └── namespace_src
│   ├── namespace
│   └── pyproject.toml
├── main.py
├── poetry.lock
├── pyproject.toml
└── src
├── myapp
│   └── __init__.py
└── myapp_web
└── __init__.py
16 directories, 9 files
[tool.poetry]
name = "111ns"
version = "0.1.0"
description = ""
authors = ["alex.oleshkevich <alex.oleshkevich@gmail.com>"]
packages = [
{include = "myapp", from = "./src/"},
{include = "myapp_web", from = "./src/"}
]
[tool.poetry.dependencies]
python = "^3.8"
"namespace.module1" = {path = "libs/module1_src", develop = true}
"namespace.module2" = {path = "libs/module2_src", develop = true}
"namespace.module3" = {path = "libs/module3_src", develop = true}
"namespace" = {path = "libs/namespace_src"}
[tool.poetry.dev-dependencies]
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "namespace.module1"
version = "0.1.0"
description = "Next generation python web framework."
authors = ["Alex Oleshkevich <alex.oleshkevich@gmail.com>"]
license = "MIT"
packages = [
{include = "namespace"}
]
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
> poetry run python
Python 3.8.6 (default, Dec 13 2020, 15:35:55)
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import namespace.module1
/tmp/111ns/.venv/lib/python3.8/site-packages/namespace/__init__.py
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'namespace.module1'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment