Re: [git-buildpackage] gbp Python
Hi, On Sat, Nov 30, 2019 at 08:19:43PM +0100, john doe wrote: > Hi and thank you for your answer. > > On 11/30/2019 7:55 PM, Guido Günther wrote: > > Hi, > > On Sat, Nov 30, 2019 at 07:13:49PM +0100, john doe wrote: > >> Hi, > >> > >> Following the instructions at (1), I can install 'gbp' using pip ('pip > >> install gbp'). > >> > >> On Debian Buster, if I install 'git-buildpackage' (apt-get install > >> git-buildpackage'), and try to import gbp.git as follow it fails: > >> > >> Python 2.7.16 (default, Oct 10 2019, 22:02:15) > >> [GCC 8.3.0] on linux2 > >> Type "help", "copyright", "credits" or "license" for more information. > > from gbp.git import GitRepository > >> Traceback (most recent call last): > >> File "", line 1, in > >> ImportError: No module named gbp.Can > > > > There's no python2 support in gbp since some time. You want to use > > either python3 or use pip which gives you a gbp old enough to support > > python2. > > > > Okay, I get the following on Python3: > > > Python 3.7.3 (default, Apr 3 2019, 05:39:12) > [GCC 8.3.0] on linux > Type "help", "copyright", "credits" or "license" for more information. > >>> from gbp.git import GitRepository > Traceback (most recent call last): > File "", line 1, in > ModuleNotFoundError: No module named 'gbp' > > > Should I do anything special prior to execute the above command? > > > In other words, how can I use gbp on Python3. it just works out of the box: ``` sudo apt install git-buildpackage ... :~ (master)$ python3 Python 3.7.5rc1 (default, Oct 8 2019, 16:47:45) [GCC 9.2.1 20190909] on linux Type "help", "copyright", "credits" or "license" for more information. py> import gbp py> help(gbp) Help on package gbp: NAME gbp - The various things needed by git-buildpackage and friends PACKAGE CONTENTS command_wrappers config dch deb (package) errors format git (package) log notifications patch_series paths pkg (package) rpm (package) scripts (package) tmpfile tristate version FILE /usr/lib/python3/dist-packages/gbp/__init__.py ``` This is on Debian with gbp 0.9.17 what version are you using? Which distribution? Is python3 from the distro? Cheers, -- Guido > > -- > John Doe > ___ > git-buildpackage mailing list > git-buildpackage@lists.sigxcpu.org > http://lists.sigxcpu.org/mailman/listinfo/git-buildpackage ___ git-buildpackage mailing list git-buildpackage@lists.sigxcpu.org http://lists.sigxcpu.org/mailman/listinfo/git-buildpackage
Re: [git-buildpackage] gbp Python
On 11/30/2019 8:19 PM, john doe wrote: > Hi and thank you for your answer. > > On 11/30/2019 7:55 PM, Guido Günther wrote: >> Hi, >> On Sat, Nov 30, 2019 at 07:13:49PM +0100, john doe wrote: >>> Hi, >>> >>> Following the instructions at (1), I can install 'gbp' using pip ('pip >>> install gbp'). >>> >>> On Debian Buster, if I install 'git-buildpackage' (apt-get install >>> git-buildpackage'), and try to import gbp.git as follow it fails: >>> >>> Python 2.7.16 (default, Oct 10 2019, 22:02:15) >>> [GCC 8.3.0] on linux2 >>> Type "help", "copyright", "credits" or "license" for more information. >> from gbp.git import GitRepository >>> Traceback (most recent call last): >>> File "", line 1, in >>> ImportError: No module named gbp.Can >> >> There's no python2 support in gbp since some time. You want to use >> either python3 or use pip which gives you a gbp old enough to support >> python2. >> > > Okay, I get the following on Python3: > > > Python 3.7.3 (default, Apr 3 2019, 05:39:12) > [GCC 8.3.0] on linux > Type "help", "copyright", "credits" or "license" for more information. from gbp.git import GitRepository > Traceback (most recent call last): > File "", line 1, in > ModuleNotFoundError: No module named 'gbp' > > > Should I do anything special prior to execute the above command? > > > In other words, how can I use gbp on Python3. > While testing, I had removed 'git-buildpackage', now that the package is installed again it works out of the box with python3. Thanks for your help. -- John Doe ___ git-buildpackage mailing list git-buildpackage@lists.sigxcpu.org http://lists.sigxcpu.org/mailman/listinfo/git-buildpackage
Re: [git-buildpackage] gbp Python
Hi and thank you for your answer. On 11/30/2019 7:55 PM, Guido Günther wrote: > Hi, > On Sat, Nov 30, 2019 at 07:13:49PM +0100, john doe wrote: >> Hi, >> >> Following the instructions at (1), I can install 'gbp' using pip ('pip >> install gbp'). >> >> On Debian Buster, if I install 'git-buildpackage' (apt-get install >> git-buildpackage'), and try to import gbp.git as follow it fails: >> >> Python 2.7.16 (default, Oct 10 2019, 22:02:15) >> [GCC 8.3.0] on linux2 >> Type "help", "copyright", "credits" or "license" for more information. > from gbp.git import GitRepository >> Traceback (most recent call last): >> File "", line 1, in >> ImportError: No module named gbp.Can > > There's no python2 support in gbp since some time. You want to use > either python3 or use pip which gives you a gbp old enough to support > python2. > Okay, I get the following on Python3: Python 3.7.3 (default, Apr 3 2019, 05:39:12) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from gbp.git import GitRepository Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'gbp' Should I do anything special prior to execute the above command? In other words, how can I use gbp on Python3. -- John Doe ___ git-buildpackage mailing list git-buildpackage@lists.sigxcpu.org http://lists.sigxcpu.org/mailman/listinfo/git-buildpackage
Re: [git-buildpackage] gbp Python
Hi, On Sat, Nov 30, 2019 at 07:13:49PM +0100, john doe wrote: > Hi, > > Following the instructions at (1), I can install 'gbp' using pip ('pip > install gbp'). > > On Debian Buster, if I install 'git-buildpackage' (apt-get install > git-buildpackage'), and try to import gbp.git as follow it fails: > > Python 2.7.16 (default, Oct 10 2019, 22:02:15) > [GCC 8.3.0] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from gbp.git import GitRepository > Traceback (most recent call last): > File "", line 1, in > ImportError: No module named gbp.Can There's no python2 support in gbp since some time. You want to use either python3 or use pip which gives you a gbp old enough to support python2. Cheers, -- Guido > > > gith I install gbp for Python using apt-get? > > > In other words, What is the Python way to install gbp on Debian. > > > Any help is appriciated. > > > 1) https://pypi.org/project/gbp/ > > -- > John Doe > ___ > git-buildpackage mailing list > git-buildpackage@lists.sigxcpu.org > http://lists.sigxcpu.org/mailman/listinfo/git-buildpackage ___ git-buildpackage mailing list git-buildpackage@lists.sigxcpu.org http://lists.sigxcpu.org/mailman/listinfo/git-buildpackage