indygreg / indygreg/PyOxidizer
Packaged Borg Backup not finding Cython extensions
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 256
- PR merge metrics
- No merged PRs in 30d
Description
Still trying to package [Borg Backup](https://github.com/borgbackup/borg/) (currently uses PyInstaller) and seemingly hit a roadblock. Maybe someone spots an issue. Changed config (rest as in the template):
```
[[packaging_rule]]
type = "pip-install-simple"
package = "borgbackup"
[[embedded_python_run]]
mode = "module"
module = "borg.__main__"
```
Error when running binary:
```
Traceback (most recent call last):
File "borg.archiver", line 41, in
from .archive import Archive, ArchiveChecker, ArchiveRecreater, Statistics, is_special
File "borg.archive", line 22, in
from .cache import ChunkListEntry
File "borg.cache", line 29, in
from .crypto.key import PlaintextKey
File "borg.crypto.key", line 27, in
from ..platform import SaveFile
File "borg.platform", line 18, in
from .posix import process_alive, local_pid_alive
ImportError: cannot import name 'process_alive' from 'posix' (unknown location)
```
While compiling, this line shows up, which should be good?
```
adding embedded built extension module: borg.platform.posix
```
Not sure why it's still not finding the module. The source file is a [pyx](https://github.com/borgbackup/borg/blob/master/src/borg/platform/posix.pyx) and the compiling is done in [`setup.py`](https://github.com/borgbackup/borg/blob/master/setup.py#L99) (in a standard way, I hope). Could those relativ imports be a problem?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the packaging_rule and embedded_python_run configuration, then inspect setup.py around line 99 and the referenced borg/platform/posix.pyx source. Run the packaged Borg binary and compare the reported borg.platform.posix extension with the attempted process_alive import. Done means the packaged binary imports the extension successfully without this ImportError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100