Re: [GNC-dev] gnucash stable: Do a better job of including the -py3 option only for swig 4.1

2024-02-22 Thread Geert Janssens
Op vrijdag 23 februari 2024 01:37:40 CET schreef john:
> > On Feb 22, 2024, at 05:25, Geert Janssens 
> > wrote:> 
> > Op donderdag 22 februari 2024 13:41:43 CET schreef Derek Atkins:
> >> I'm going to throw some ideas out there, but... doesn't the "set"
> >> 
> >> overwrite the variable??  In the original you had:
> >>  set DSPF -python -Wall -Werror $(SWIG_ARGS)
> >>  if (swig_version < 4.1)
> >>  
> >> set DSPF $(SWIG_ARGS) -py3
> >> 
> >> Wouldn't this override DSPF if swig is < 4.1, getting rid of -python
> >> -Wall
> >> -Werror?  That would mean that on systems with swig < 4.1, it would not
> >> be
> >> running with -Wall -Werror, but with your new change it WOULD -- causing
> >> an error on warning where it didn't have one before.
> > 
> > This was my first attempt at making -py3 optional and definitely wrong as
> > I did indeed overwrite DSPF. But after that goof up I had already
> > committed a fix that only optionally sets -py3 as an additional parameter
> > to DSPF. In the new situation there's only one 'set' command to define
> > DSPF in which -py3 optionally comes in via a variable. And that commit
> > still bails out with an error while trying to determine the Python
> > site-package directory.
> > 
> > As far as I understand the moment configure fails on python it has not
> > even executed the code I have changed. My changes are related to
> > installing swig rules. The failure happens much earlier in the configure
> > phase namely while setting up python.
> > 
> > Note also the Ubuntu 22.04 ci tests run fine. Ubuntu 22.04 comes with swig
> > 4.0, hence also older than 4.1.
> 
> Geert,
> 
> I think that it fails on your push is coincidental.  Github updated the
> python version overnight: When [CI ran after my push
> yesterday](https://github.com/Gnucash/gnucash/actions/runs/7997611600/job/2
> 1842396667) python was version 3.12.1 and in [the failing
> test](https://github.com/Gnucash/gnucash/actions/runs/8002824454/job/218588
> 76155) it's 3.12.2.
> 
> I figured out a fix and pushed it.
> 
> Regards,
> John Ralls
 
Thanks!

Geert

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] gnucash stable: Do a better job of including the -py3 option only for swig 4.1

2024-02-22 Thread john



> On Feb 22, 2024, at 05:25, Geert Janssens  wrote:
> 
> Op donderdag 22 februari 2024 13:41:43 CET schreef Derek Atkins:
>> I'm going to throw some ideas out there, but... doesn't the "set"
>> overwrite the variable??  In the original you had:
>> 
>>  set DSPF -python -Wall -Werror $(SWIG_ARGS)
>>  if (swig_version < 4.1)
>> set DSPF $(SWIG_ARGS) -py3
>> 
>> Wouldn't this override DSPF if swig is < 4.1, getting rid of -python -Wall
>> -Werror?  That would mean that on systems with swig < 4.1, it would not be
>> running with -Wall -Werror, but with your new change it WOULD -- causing
>> an error on warning where it didn't have one before.
>> 
> 
> This was my first attempt at making -py3 optional and definitely wrong as I 
> did indeed 
> overwrite DSPF. But after that goof up I had already committed a fix that 
> only optionally 
> sets -py3 as an additional parameter to DSPF. In the new situation there's 
> only one 'set' 
> command to define DSPF in which -py3 optionally comes in via a variable. And 
> that commit 
> still bails out with an error while trying to determine the Python 
> site-package directory.
> 
> As far as I understand the moment configure fails on python it has not even 
> executed the 
> code I have changed. My changes are related to installing swig rules. The 
> failure happens 
> much earlier in the configure phase namely while setting up python.
> 
> Note also the Ubuntu 22.04 ci tests run fine. Ubuntu 22.04 comes with swig 
> 4.0, hence also 
> older than 4.1.

Geert,

I think that it fails on your push is coincidental.  Github updated the python 
version overnight: When [CI ran after my push 
yesterday](https://github.com/Gnucash/gnucash/actions/runs/7997611600/job/21842396667)
 python was version 3.12.1 and in [the failing 
test](https://github.com/Gnucash/gnucash/actions/runs/8002824454/job/21858876155)
 it's 3.12.2.

I figured out a fix and pushed it.

Regards,
John Ralls

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] gnucash stable: Do a better job of including the -py3 option only for swig 4.1

2024-02-22 Thread Geert Janssens
Op donderdag 22 februari 2024 13:41:43 CET schreef Derek Atkins:
> I'm going to throw some ideas out there, but... doesn't the "set"
> overwrite the variable??  In the original you had:
> 
>   set DSPF -python -Wall -Werror $(SWIG_ARGS)
>   if (swig_version < 4.1)
>  set DSPF $(SWIG_ARGS) -py3
> 
> Wouldn't this override DSPF if swig is < 4.1, getting rid of -python -Wall
> -Werror?  That would mean that on systems with swig < 4.1, it would not be
> running with -Wall -Werror, but with your new change it WOULD -- causing
> an error on warning where it didn't have one before.
> 

This was my first attempt at making -py3 optional and definitely wrong as I did 
indeed 
overwrite DSPF. But after that goof up I had already committed a fix that only 
optionally 
sets -py3 as an additional parameter to DSPF. In the new situation there's only 
one 'set' 
command to define DSPF in which -py3 optionally comes in via a variable. And 
that commit 
still bails out with an error while trying to determine the Python site-package 
directory.

As far as I understand the moment configure fails on python it has not even 
executed the 
code I have changed. My changes are related to installing swig rules. The 
failure happens 
much earlier in the configure phase namely while setting up python.

Note also the Ubuntu 22.04 ci tests run fine. Ubuntu 22.04 comes with swig 4.0, 
hence also 
older than 4.1.

Regards,

Geert
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] gnucash stable: Do a better job of including the -py3 option only for swig 4.1

2024-02-22 Thread Derek Atkins
I'm going to throw some ideas out there, but... doesn't the "set"
overwrite the variable??  In the original you had:

  set DSPF -python -Wall -Werror $(SWIG_ARGS)
  if (swig_version < 4.1)
 set DSPF $(SWIG_ARGS) -py3

Wouldn't this override DSPF if swig is < 4.1, getting rid of -python -Wall
-Werror?  That would mean that on systems with swig < 4.1, it would not be
running with -Wall -Werror, but with your new change it WOULD -- causing
an error on warning where it didn't have one before.

-derek

On Thu, February 22, 2024 6:21 am, Geert Janssens wrote:
> My last commit causes a CI failure on MacOS. Unfortunately I can't find
> why that would be.
> As far as I can see I haven't changed anything that could cause the
> distutils module not to
> be found by python.
>
>
> There are other errors later on in the configure output relating to a
> read-only file system.
>
>
> I have retried but the error doesn't go away. Perhaps I should wait a bit
> longer before
> retrying ?
>
>
> Geert
>
>
> Op donderdag 22 februari 2024 11:14:04 CET schreef Geert Janssens:
>> Updatedvia  https://github.com/Gnucash/gnucash/commit/b9eb550b
>> (commit)
>> from  https://github.com/Gnucash/gnucash/commit/cbf89a73 (commit)
>>
>>
>>
>> commit b9eb550b9a9a2ff0a5e926debb1bee5a073a5319
>> Author: Geert Janssens 
>> Date:   Thu Feb 22 11:13:59 2024 +0100
>>
>> Do a better job of including the -py3 option only for swig 4.1
>>
>> The previous attempt broke builds with swig older than 4.1
>>
>> diff --git a/common/cmake_modules/GncAddSwigCommand.cmake
>> b/common/cmake_modules/GncAddSwigCommand.cmake index 23bbebcabf..
> 811f347608
>> 100644
>> --- a/common/cmake_modules/GncAddSwigCommand.cmake
>> +++ b/common/cmake_modules/GncAddSwigCommand.cmake
>> @@ -68,16 +68,14 @@ macro (gnc_add_swig_python_command _target _out_var
>> _py_out_var _output _py_outp set(py_outfile
>> ${SW_CURR_BUILD_SOURCE_DIR}/${_py_output})
>>  set(${_py_out_var} ${py_outfile}) # This variable is set for
>> convenience to use in the calling CMakeLists.txt
>>
>> +if (${SWIG_VERSION} VERSION_LESS 4.1)
>> +set (SWIG_EXTRA_OPT -py3)
>> +endif()
>>  set (DEFAULT_SWIG_PYTHON_FLAGS
>> --python
>> +-python ${SWIG_EXTRA_OPT}
>>  -Wall -Werror
>>  ${SWIG_ARGS}
>>  )
>> -if (${SWIG_VERSION} VERSION_LESS 4.1)
>> -set (DEFAULT_SWIG_PYTHON_FLAGS
>> -${SWIG_ARGS} -py3
>> -)
>> -endif()
>>  set (DEFAULT_SWIG_PYTHON_C_INCLUDES
>>   ${GLIB2_INCLUDE_DIRS}
>>   ${CMAKE_SOURCE_DIR}/common
>>
>>
>>
>> Summary of changes:
>>  common/cmake_modules/GncAddSwigCommand.cmake | 10 --
>>  1 file changed, 4 insertions(+), 6 deletions(-)
>>
>> ___
>> gnucash-changes mailing list
>> gnucash-chan...@gnucash.org
>> https://lists.gnucash.org/mailman/listinfo/gnucash-changes
>
>
> ___
> gnucash-devel mailing list
> gnucash-devel@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>


-- 
   Derek Atkins 617-623-3745
   de...@ihtfp.com www.ihtfp.com
   Computer and Internet Security Consultant

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] gnucash stable: Do a better job of including the -py3 option only for swig 4.1

2024-02-22 Thread Geert Janssens
My last commit causes a CI failure on MacOS. Unfortunately I can't find why 
that would be. 
As far as I can see I haven't changed anything that could cause the distutils 
module not to 
be found by python.


There are other errors later on in the configure output relating to a read-only 
file system.


I have retried but the error doesn't go away. Perhaps I should wait a bit 
longer before 
retrying ?


Geert


Op donderdag 22 februari 2024 11:14:04 CET schreef Geert Janssens:
> Updatedvia  https://github.com/Gnucash/gnucash/commit/b9eb550b (commit)
> from  https://github.com/Gnucash/gnucash/commit/cbf89a73 (commit)
> 
> 
> 
> commit b9eb550b9a9a2ff0a5e926debb1bee5a073a5319
> Author: Geert Janssens 
> Date:   Thu Feb 22 11:13:59 2024 +0100
> 
> Do a better job of including the -py3 option only for swig 4.1
> 
> The previous attempt broke builds with swig older than 4.1
> 
> diff --git a/common/cmake_modules/GncAddSwigCommand.cmake
> b/common/cmake_modules/GncAddSwigCommand.cmake index 23bbebcabf..
811f347608
> 100644
> --- a/common/cmake_modules/GncAddSwigCommand.cmake
> +++ b/common/cmake_modules/GncAddSwigCommand.cmake
> @@ -68,16 +68,14 @@ macro (gnc_add_swig_python_command _target _out_var
> _py_out_var _output _py_outp set(py_outfile
> ${SW_CURR_BUILD_SOURCE_DIR}/${_py_output})
>  set(${_py_out_var} ${py_outfile}) # This variable is set for
> convenience to use in the calling CMakeLists.txt
> 
> +if (${SWIG_VERSION} VERSION_LESS 4.1)
> +set (SWIG_EXTRA_OPT -py3)
> +endif()
>  set (DEFAULT_SWIG_PYTHON_FLAGS
> --python
> +-python ${SWIG_EXTRA_OPT}
>  -Wall -Werror
>  ${SWIG_ARGS}
>  )
> -if (${SWIG_VERSION} VERSION_LESS 4.1)
> -set (DEFAULT_SWIG_PYTHON_FLAGS
> -${SWIG_ARGS} -py3
> -)
> -endif()
>  set (DEFAULT_SWIG_PYTHON_C_INCLUDES
>   ${GLIB2_INCLUDE_DIRS}
>   ${CMAKE_SOURCE_DIR}/common
> 
> 
> 
> Summary of changes:
>  common/cmake_modules/GncAddSwigCommand.cmake | 10 --
>  1 file changed, 4 insertions(+), 6 deletions(-)
> 
> ___
> gnucash-changes mailing list
> gnucash-chan...@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-changes


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel