1,554 questions
1
vote
1
answer
62
views
Can't Import Module with Python Package with Subpackages All as Zip Archive
I am experimenting with how to package my python code as a zip archive. I understand there are other ways to share and distribute code. Right now I am specifically interested in how to get this to ...
1
vote
0
answers
162
views
What is the documented behaviour (if any) when someone imports `pkg.__init__[ as pkg]` instead of `import pkg`?
To be clear, I'm not suggesting anyone actually should import pkg.__init__ directly. This is to understand potential pitfalls if someone decides to convert a module-only distribution into a package, ...
2
votes
1
answer
65
views
Python packaging: single-module with package data
I want to install my single file module together with its py.typed file using setuptools and pyproject.toml.
I'm packaging a Python single-module, and so far I was using a very simple pyproject.toml:
[...
2
votes
2
answers
68
views
Unable to create .whl distribution for only one Python package
My goal is to create a .whl installer file for only one given package. There are multiple packages in the directory tree.
setup.py:
from setuptools import setup
setup(
name="package1",
...
0
votes
0
answers
112
views
How to automate running Mypy stubgen on build?
I am new to PyO3. Out of the box it supports building with maturin or setuptools-rust. It does not support making Python type stub (.pyi) files by itself yet (incomplete feature). Mypy's stubgen does ...
-2
votes
1
answer
87
views
Is it possible to install submodules of a python package dynamically?
I have a very complex Python library that is used by several people/projects for different purposes.
The structure is basically the same as many Python libraries, but I would like to give the ability ...
0
votes
0
answers
97
views
Setuptools : why editable mode does not work outside of my project directory?
I don't manage to make the editable mode pip install -e . for a local installation of my project. After the installation, when I import a constructor from a module of my package within in python shell ...
1
vote
2
answers
122
views
How do you use just one folder from a repository as a submodule?
I have a repository which needs just one folder from another, but it needs to keep updating when the other repo changes, so I plan to use a submodule, but how do I take just the singular folder?
This ...
-5
votes
1
answer
109
views
simplest jinja2 template loading for one-file python script
I'm using Python only for simple scripts and every time I look into Python packaging, there is a new standard or technologie.
Now when I develop a small one-file tool and want to load a jinja2 ...
0
votes
0
answers
57
views
Why does pip install incompatible packages from Google Artifact Registry (Python repo) instead of resolving properly?
I'm using Google Artifact Registry to host Python packages, and I'm running into a serious issue with pip installing incompatible versions of packages (like numpy or scipy)
Problem:
When I run:
pip ...
2
votes
1
answer
3k
views
How to uv add git repo with subpackages
I want to use uv to install packages and add dependencies, equivalent to the following pip workflow:
git clone https://github.com/<username>/<repository>.git
cd <repository>
pip ...
0
votes
0
answers
30
views
How to manage internal dependencies within a project when using `pip install -e .`?
Detail of the Problem:
My simple project structure is as follows:
└─mris
├─mris.egg-info
├─seggms
│ ├─training
│ │ └─run_training.py
├─utilities
│ └─config.py (contains ...
2
votes
1
answer
70
views
Pyairbyte will not pick up my local changes to a source connector
I am uncertain of how to do development against an existing connector using pyairbyte. I cannot get pyairbyte to successfully load my modified source connector. I have made changes to the source-...
0
votes
0
answers
63
views
Can I specify a different directory for transient files, when invoking Python build-module?
I currently build my simple Python module with a command like:
python3 -m build --wheel --outdir /tmp .
This creates the /tmp/mypackage-0.1-py3-none-any.whl -- as one would expect. However, it also ...
1
vote
0
answers
134
views
Installing my own single-file Python project
I have a rather small package, with only the single __init__.py at the top-level, which I attempt to install with pip-3.11 install --user ..
Pip duly processes my pyproject.toml, checking all of the ...