Hey.

I'm already using dh_python for (Python) packages where I have a
pyproject.toml with some [project.scripts] section and use
python3-setuptools for building, which works quite nicely.


Now I do have some standalone python scripts for which it makes not
much sense to make them (Python) packages (i.e. there's no
__init__.py, etc.), yet I'd still like to have stuff like
automatically getting the right Debian package dependencies in a
Debian package.

Is that even intended to work with dh_python?

If so, how does it work, cause so far I didn't manage to get it working.
AFAIU using [project.scripts] section doesn't work, as I have no
(Python) package.

I tried with:
[tool.setuptools]
script-files = ["src/my-script.py"]


While that builds me a .deb:
a) script-files is discouraged per setuptools documentation
b) the Debian packge has none of the python packages/modules that I
import auto-detected as dependencies
c) After installing the package, tools like ptpyhon think there'd be a
my-script (notice the hyphen) package (i.e. when I type import my it
shows me my-script as auto-completion suggestion).
Not sure where that comes from, cause there's only:
└── usr
    ├── bin
    │   └── my-script.py
    ├── lib
    │   └── python3
    │       └── dist-packages
    │           └── my_script-1.0.0.dist-info
    │               ├── INSTALLER
    │               ├── METADATA
    │               ├── WHEEL
    │               └── top_level.txt

perhaps from the py3compile in the postinst?


Thanks for any help :-)

Philippe

Reply via email to