[PATCH 2 of 8 3.26] [debian] Install cubicweb-ctl from python2 build

Denis Laxalde denis.laxalde at logilab.fr
Wed Jun 26 12:05:34 CEST 2019


Philippe Pepiot a écrit :
> On 25/06/2019, Denis Laxalde wrote:
>> # HG changeset patch
>> # User Denis Laxalde <denis.laxalde at logilab.fr>
>> # Date 1561473778 -7200
>> #      mar. juin 25 16:42:58 2019 +0200
>> # Branch 3.26
>> # Node ID 112f3c2b6f1ee3466447a010d3ce22b5a19c4dc8
>> # Parent  2337c8c056576e5e6d93b8f70eb13e1fb6098e67
>> # Available At https://hg.logilab.org/review/cubicweb
>> #              hg pull https://hg.logilab.org/review/cubicweb -r 112f3c2b6f1e
>> [debian] Install cubicweb-ctl from python2 build
>>
>> Previously, the binary package was empty. Now it is bound to
>> the python2 package as support for python3 is "fresh".
>>
>> In order python2 and python3 packages to be co-installable, we drop the
>> cubicweb-ctl file from both packages.
>>
>> diff --git a/debian/changelog b/debian/changelog
>> --- a/debian/changelog
>> +++ b/debian/changelog
>> @@ -2,6 +2,7 @@ cubicweb (3.26.11-2) UNRELEASED; urgency
>>  
>>    * Remove build dependency on dh-systemd
>>    * Build python3 basic packages
>> +  * Actually install something in cubicweb-ctl binary package
>>  
>>   -- Denis Laxalde <denis.laxalde at logilab.fr>  Tue, 25 Jun 2019 16:38:09 +0200
>>  
>> diff --git a/debian/rules b/debian/rules
>> --- a/debian/rules
>> +++ b/debian/rules
>> @@ -23,3 +23,8 @@ endif
>>  override_dh_installchangelogs:
>>  	dh_installchangelogs -Xdoc/changes
>>  
>> +override_dh_auto_install:
>> +	dh_auto_install
>> +	mkdir -p debian/cubicweb-ctl/usr/bin
>> +	mv debian/python-cubicweb/usr/bin/cubicweb-ctl debian/cubicweb-ctl/usr/bin
>> +	rm debian/python3-cubicweb/usr/bin/cubicweb-ctl
> 
> I think this /usr/bin/cubicweb-ctl won't work with python3 because it
> contains a python2 sheebang.

My goal is actually to make cubicweb-ctl tied to python2 version in 3.26
branch as fast path to deliver python3 packages in this version without
breaking existing installations (using python2).

In any cases, one can get cubicweb-ctl by running "python3 -m cubicweb"
so it's not a big deal in practice.

> I think one way to fix this and having it works with python2, python3
> and both installed is to write a wrapper shell script detecting python
> version.
> For example of such script https://salsa.debian.org/python-team/modules/python-django/blob/debian/sid/debian/django-admin

Maybe. Not sure this is worth it since the next version will drop
python2 support.



More information about the cubicweb-devel mailing list