Re: [PATCH 1/5] debian/control: build-depend on python3-sphinx instead of python-sphinx

2017-12-04 Thread Tomi Ollila
On Mon, Dec 04 2017, Tomi Ollila wrote:

> On Mon, Dec 04 2017, Daniel Kahn Gillmor wrote:
>
>> On Sun 2017-12-03 15:35:04 +0200, Tomi Ollila wrote:
>>> On Thu, Nov 30 2017, Daniel Kahn Gillmor wrote:
>>>

 hm, on further reflection, this one is specifically problematic because
 of the use of:

 ${python} -m sphinx.writers.manpage

 in ./configure, used to test for the presence of the sphinx module.

 This can be fixed by preferring python3 here:

 --- a/configure
 +++ b/configure
 @@ -557,7 +557,7 @@ fi
  printf "Checking for python... "
  have_python=0
  
 -for name in ${PYTHON} python python2 python3; do
 +for name in ${PYTHON} python3 python python2; do
>>>
  if command -v $name > /dev/null; then
 have_python=1
 python=$name

 any thoughts or preferences on this?
>>>
>>> I'd like this change. I was going to suggest "${PYTHON}" there
>>> but perhaps if one sets e.g.
>>>
>>> PYTHON='/usr/local/bin/python3 -B -E -u'
>>>
>>> The above would still work (I'd say this is potentially more useful
>>> than supporting whitespace in paths).
>>
>> does it work?  i think the -B -E -u will all be tried as possible python
>> implementations separately, no?  and $python itself will just get set to
>> /usr/local/bin/python3 with the arguments dropped :(
>
> Ahh, you're right. Alternative would be to check whether "${PYTHON-}" is
> a nonempty string and use that...

Now that I said it, I'm compelled to write an example. Simpler
alternative is to just have what you Daniel first wrote...

.. so I'm, fine with original  for name in ${PYTHON} python3 python python2; do


have_python=0

if test "${PYTHON-}"; then
name=${PYTHON%%[$IFS]*}
if command -v $name > /dev/null; then
have_python=1
python=$name
fi
fi
if [ $have_python -eq 0 ]; then
for name in python3 python python2; do
if command -v $name > /dev/null; then
have_python=1
python=$name
fi
done
fi

>
> Tomi
>
>>
>> 0 dkg@alice:~$ x="a b c"
>> 0 dkg@alice:~$ for y in ${x} d e; do printf ':%s\n' "$y"; done
>> :a
>> :b
>> :c
>> :d
>> :e
>> 0 dkg@alice:~$ 
>>
>> While i think this doesn't support Tomi's extended use case, i still
>> think it's the right direction to move in.
>>
>> Does anyone have any objection to the preference order change above?  Is
>> there any reason we should be preferring python 2 to python3 as we move
>> forward?
>>
>> --dkg
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH 1/5] debian/control: build-depend on python3-sphinx instead of python-sphinx

2017-12-04 Thread Tomi Ollila
On Mon, Dec 04 2017, Daniel Kahn Gillmor wrote:

> On Sun 2017-12-03 15:35:04 +0200, Tomi Ollila wrote:
>> On Thu, Nov 30 2017, Daniel Kahn Gillmor wrote:
>>
>>> On Thu 2017-11-30 04:40:39 -0500, Daniel Kahn Gillmor wrote:
 python2 is going to be deprecated, and python3-sphinx is available all
 the way back to oldoldstable.  let's use the more modern version.
 ---
  debian/control | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/debian/control b/debian/control
 index 20b8a2db..3a624fdc 100644
 --- a/debian/control
 +++ b/debian/control
 @@ -18,7 +18,7 @@ Build-Depends:
   python3-all (>= 3.1.2-7~),
   dh-python,
   dh-elpa (>= 1.3),
 - python-sphinx (>= 1.0),
 + python3-sphinx,
   ruby, ruby-dev (>>1:1.9.3~),
   emacs25-nox | emacs25 (>=25~) | emacs25-lucid (>=25~) |
   emacs24-nox | emacs24 (>=24~) | emacs24-lucid (>=24~) |
>>>
>>> hm, on further reflection, this one is specifically problematic because
>>> of the use of:
>>>
>>> ${python} -m sphinx.writers.manpage
>>>
>>> in ./configure, used to test for the presence of the sphinx module.
>>>
>>> This can be fixed by preferring python3 here:
>>>
>>> --- a/configure
>>> +++ b/configure
>>> @@ -557,7 +557,7 @@ fi
>>>  printf "Checking for python... "
>>>  have_python=0
>>>  
>>> -for name in ${PYTHON} python python2 python3; do
>>> +for name in ${PYTHON} python3 python python2; do
>>
>>>  if command -v $name > /dev/null; then
>>> have_python=1
>>> python=$name
>>>
>>> any thoughts or preferences on this?
>>
>> I'd like this change. I was going to suggest "${PYTHON}" there
>> but perhaps if one sets e.g.
>>
>> PYTHON='/usr/local/bin/python3 -B -E -u'
>>
>> The above would still work (I'd say this is potentially more useful
>> than supporting whitespace in paths).
>
> does it work?  i think the -B -E -u will all be tried as possible python
> implementations separately, no?  and $python itself will just get set to
> /usr/local/bin/python3 with the arguments dropped :(

Ahh, you're right. Alternative would be to check whether "${PYTHON-}" is
a nonempty string and use that...

Tomi

>
> 0 dkg@alice:~$ x="a b c"
> 0 dkg@alice:~$ for y in ${x} d e; do printf ':%s\n' "$y"; done
> :a
> :b
> :c
> :d
> :e
> 0 dkg@alice:~$ 
>
> While i think this doesn't support Tomi's extended use case, i still
> think it's the right direction to move in.
>
> Does anyone have any objection to the preference order change above?  Is
> there any reason we should be preferring python 2 to python3 as we move
> forward?
>
> --dkg
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH 1/5] debian/control: build-depend on python3-sphinx instead of python-sphinx

2017-12-04 Thread Daniel Kahn Gillmor
On Sun 2017-12-03 15:35:04 +0200, Tomi Ollila wrote:
> On Thu, Nov 30 2017, Daniel Kahn Gillmor wrote:
>
>> On Thu 2017-11-30 04:40:39 -0500, Daniel Kahn Gillmor wrote:
>>> python2 is going to be deprecated, and python3-sphinx is available all
>>> the way back to oldoldstable.  let's use the more modern version.
>>> ---
>>>  debian/control | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/debian/control b/debian/control
>>> index 20b8a2db..3a624fdc 100644
>>> --- a/debian/control
>>> +++ b/debian/control
>>> @@ -18,7 +18,7 @@ Build-Depends:
>>>   python3-all (>= 3.1.2-7~),
>>>   dh-python,
>>>   dh-elpa (>= 1.3),
>>> - python-sphinx (>= 1.0),
>>> + python3-sphinx,
>>>   ruby, ruby-dev (>>1:1.9.3~),
>>>   emacs25-nox | emacs25 (>=25~) | emacs25-lucid (>=25~) |
>>>   emacs24-nox | emacs24 (>=24~) | emacs24-lucid (>=24~) |
>>
>> hm, on further reflection, this one is specifically problematic because
>> of the use of:
>>
>> ${python} -m sphinx.writers.manpage
>>
>> in ./configure, used to test for the presence of the sphinx module.
>>
>> This can be fixed by preferring python3 here:
>>
>> --- a/configure
>> +++ b/configure
>> @@ -557,7 +557,7 @@ fi
>>  printf "Checking for python... "
>>  have_python=0
>>  
>> -for name in ${PYTHON} python python2 python3; do
>> +for name in ${PYTHON} python3 python python2; do
>
>>  if command -v $name > /dev/null; then
>> have_python=1
>> python=$name
>>
>> any thoughts or preferences on this?
>
> I'd like this change. I was going to suggest "${PYTHON}" there
> but perhaps if one sets e.g.
>
> PYTHON='/usr/local/bin/python3 -B -E -u'
>
> The above would still work (I'd say this is potentially more useful
> than supporting whitespace in paths).

does it work?  i think the -B -E -u will all be tried as possible python
implementations separately, no?  and $python itself will just get set to
/usr/local/bin/python3 with the arguments dropped :(

0 dkg@alice:~$ x="a b c"
0 dkg@alice:~$ for y in ${x} d e; do printf ':%s\n' "$y"; done
:a
:b
:c
:d
:e
0 dkg@alice:~$ 

While i think this doesn't support Tomi's extended use case, i still
think it's the right direction to move in.

Does anyone have any objection to the preference order change above?  Is
there any reason we should be preferring python 2 to python3 as we move
forward?

--dkg


signature.asc
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH 1/5] debian/control: build-depend on python3-sphinx instead of python-sphinx

2017-12-03 Thread Tomi Ollila
On Thu, Nov 30 2017, Daniel Kahn Gillmor wrote:

> On Thu 2017-11-30 04:40:39 -0500, Daniel Kahn Gillmor wrote:
>> python2 is going to be deprecated, and python3-sphinx is available all
>> the way back to oldoldstable.  let's use the more modern version.
>> ---
>>  debian/control | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/debian/control b/debian/control
>> index 20b8a2db..3a624fdc 100644
>> --- a/debian/control
>> +++ b/debian/control
>> @@ -18,7 +18,7 @@ Build-Depends:
>>   python3-all (>= 3.1.2-7~),
>>   dh-python,
>>   dh-elpa (>= 1.3),
>> - python-sphinx (>= 1.0),
>> + python3-sphinx,
>>   ruby, ruby-dev (>>1:1.9.3~),
>>   emacs25-nox | emacs25 (>=25~) | emacs25-lucid (>=25~) |
>>   emacs24-nox | emacs24 (>=24~) | emacs24-lucid (>=24~) |
>
> hm, on further reflection, this one is specifically problematic because
> of the use of:
>
> ${python} -m sphinx.writers.manpage
>
> in ./configure, used to test for the presence of the sphinx module.
>
> This can be fixed by preferring python3 here:
>
> --- a/configure
> +++ b/configure
> @@ -557,7 +557,7 @@ fi
>  printf "Checking for python... "
>  have_python=0
>  
> -for name in ${PYTHON} python python2 python3; do
> +for name in ${PYTHON} python3 python python2; do

>  if command -v $name > /dev/null; then
> have_python=1
> python=$name
>
> any thoughts or preferences on this?

I'd like this change. I was going to suggest "${PYTHON}" there
but perhaps if one sets e.g.

PYTHON='/usr/local/bin/python3 -B -E -u'

The above would still work (I'd say this is potentially more useful
than supporting whitespace in paths).

Tomi


>
> --dkg
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH 1/5] debian/control: build-depend on python3-sphinx instead of python-sphinx

2017-11-30 Thread Daniel Kahn Gillmor
On Thu 2017-11-30 04:40:39 -0500, Daniel Kahn Gillmor wrote:
> python2 is going to be deprecated, and python3-sphinx is available all
> the way back to oldoldstable.  let's use the more modern version.
> ---
>  debian/control | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/debian/control b/debian/control
> index 20b8a2db..3a624fdc 100644
> --- a/debian/control
> +++ b/debian/control
> @@ -18,7 +18,7 @@ Build-Depends:
>   python3-all (>= 3.1.2-7~),
>   dh-python,
>   dh-elpa (>= 1.3),
> - python-sphinx (>= 1.0),
> + python3-sphinx,
>   ruby, ruby-dev (>>1:1.9.3~),
>   emacs25-nox | emacs25 (>=25~) | emacs25-lucid (>=25~) |
>   emacs24-nox | emacs24 (>=24~) | emacs24-lucid (>=24~) |

hm, on further reflection, this one is specifically problematic because
of the use of:

${python} -m sphinx.writers.manpage

in ./configure, used to test for the presence of the sphinx module.

This can be fixed by preferring python3 here:

--- a/configure
+++ b/configure
@@ -557,7 +557,7 @@ fi
 printf "Checking for python... "
 have_python=0
 
-for name in ${PYTHON} python python2 python3; do
+for name in ${PYTHON} python3 python python2; do
 if command -v $name > /dev/null; then
have_python=1
python=$name

any thoughts or preferences on this?

--dkg
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


[PATCH 1/5] debian/control: build-depend on python3-sphinx instead of python-sphinx

2017-11-30 Thread Daniel Kahn Gillmor
python2 is going to be deprecated, and python3-sphinx is available all
the way back to oldoldstable.  let's use the more modern version.
---
 debian/control | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index 20b8a2db..3a624fdc 100644
--- a/debian/control
+++ b/debian/control
@@ -18,7 +18,7 @@ Build-Depends:
  python3-all (>= 3.1.2-7~),
  dh-python,
  dh-elpa (>= 1.3),
- python-sphinx (>= 1.0),
+ python3-sphinx,
  ruby, ruby-dev (>>1:1.9.3~),
  emacs25-nox | emacs25 (>=25~) | emacs25-lucid (>=25~) |
  emacs24-nox | emacs24 (>=24~) | emacs24-lucid (>=24~) |
-- 
2.15.0

___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch