[git-buildpackage] Hacking: How to run git-buildpackage from sources?
Guido Günther
agx at sigxcpu.org
Mon Dec 16 10:06:33 CET 2024
Hi,
On Sun, Dec 15, 2024 at 07:37:30PM -0800, Otto Kekäläinen wrote:
> Hi!
>
> I can run the system gbp like this:
> # gbp --version
> gbp 0.9.35
>
> ..and the packaged one in source tree like this:
> # ./debian/tmp/usr/bin/gbp --version
> gbp 0.9.35
>
>
> ..but what is the syntax to run the unpackaged raw source python?
>
> I tried these but there is some gap in my understanding of the
> "superfile" architecture this Python project has.
>
> # PYTHONPATH="$PWD;$PYTHONPATH" python3 -m gbp.main --version
> /usr/bin/python3: No module named gbp.main
>
> # python3 -m gbp --version
> /usr/bin/python3: No module named gbp.__main__; 'gbp' is a package and
> cannot be directly executed
I'm using
```
$ cat ~/bin/gbp-from-sourcetree
#!/bin/bash
set -e
GBP=/path/to/git-buildpackage/
export PYTHONPATH="${GBP}"
CMD=${1//-/_}
shift
python3 "${GBP}/gbp/scripts/$CMD.py" $@
```
Cheers,
-- Guido
> _______________________________________________
> git-buildpackage mailing list
> git-buildpackage at lists.sigxcpu.org
> http://lists.sigxcpu.org/mailman/listinfo/git-buildpackage
>
More information about the git-buildpackage
mailing list