51 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
0
answers
37
views
Why does __init__.py break namespace packaging?
This package structure works fine for namespace packaging:
├── pkg
│ ├── module
│ │ └── a.py
│ └── pyproject.toml
└── subfolder
├── pkg
│ └── module
│ └── b.py
└── ...
0
votes
1
answer
825
views
Does importing a namespace package also import the modules in the directory?
This explanation of package imports says that importing a package packB without an __init__.py file doesn't do anything because __init__.py tells the import process what other *.py files to import.
I'...
0
votes
0
answers
60
views
Package data not included when installing custom Python package on Google Cloud Functions
I have a custom namespace package with additional data files that are included via the package_data argument of setuptools.setup. When I install this custom package for my Google Cloud Function, the ...
1
vote
1
answer
4k
views
Packaging and building python namespace packages
What I am trying to do?
Have one large package with several installable parts, which need to work together, but specific parts can be used on their own. I decided to use namespace package, as it seems ...
1
vote
0
answers
124
views
Conflicting names in Python namespace plugins
I'm following the plugins packaging guide, using the 'namespace packages' approach.
I've written two plugins, with the following structure:
plugin_1
├── pyproject.toml
├── setup.py
└── myapp
└── ...
1
vote
2
answers
140
views
Matlab paths and file handling with packages and class folders
So I have the following (simplified) project structure.
scripts/
client.m
src/
+estimators/
@estimator1/
3party/
shell_script.sh
estimator1.m
...
2
votes
1
answer
2k
views
How to load implicit namespace package by adding the package egg to sys.path?
Since python 3.3, implicit namespace packages are supported, so that I can have two packages:
a
├── b
├── __init__.py
a
├── c
├── __init__.py
and import a.b and a.c without problems. But it ...
1
vote
1
answer
1k
views
Namespaces packages several levels deep, and sphinx
I'm trying to use packages like "project-a" in a namespace like "com.company", with implicit namespaces.
I'm finding that sphinx-apidoc isn't putting my packages in to the toc in ...
1
vote
1
answer
801
views
PyPI packaging, namespace packages and subpackaging problems
I've uploaded my personnal generic functions called ofunctions to github in order to share them between my projects, and having separate CI and coverage tests. Link to github project here.
So far so ...
3
votes
1
answer
2k
views
Is it possible to create docs for multiple packages within the same git repository with sphinx-apidoc?
I have a git repository which includes multiple packages which follow a namespace (i.e PEP 420.
I am trying to create a ReadTheDocs documentation using Sphinx.
The git repository looks like this repo: ...
1
vote
1
answer
498
views
Python how to remove path from sys.path_importer_cache (invalid namespace import)
I have a weird phenomenon (Windows, python 3.8.5): I have a folder: c:\myfolder. Somehow this folder got into the sys.path_importer_cache, and now every subfolder in c:\myfolder can be imported as ...
2
votes
1
answer
383
views
Can objects be pulled into the top namespace level when using Python's implicit namespace support? [duplicate]
I have a project that I'd like to restructure to use Python's native implicit namespacing. I have code that I'd like to interface with like this:
from mypackage import Foo
from mypackage.admin import ...
7
votes
1
answer
2k
views
relative position and content of namespace packages in Python >= 3.3
I read the docs and quite some stackoverflow posts, but did not find an explicit answer to my doubts.
I think I understand what namespace packages are for.
I am only interested in Python>=3.3 and ...
0
votes
1
answer
6k
views
"Package init file not found (or not a regular file)" - error when building sdist for namespace package
I have a namespace package with folder structure as:
CompanyName\DepartmentName\SubDepartmentName\PkgName
Python 3.3 onwards supports namespace packages so I have not place the __init__.py files in ...
0
votes
0
answers
250
views
How to pass arguments to __init__.py? [duplicate]
Considering a namespace package in python 3.7, how would I pass an argument to my package when I initialise it?
my_package
__init__.py
I wish to be able to call my_package(arg).
Thank you,