← Back to team overview

kicad-developers team mailing list archive

Re: wxPython version check

 

On 2/15/2015 7:27 PM, Garth Corral wrote:
> I think perhaps we’re having a miscommunication.  I don’t think it’s
> thin ice at all to build a version of a dependency and then pointing my
> kicad build at it.  I think it’s more of an issue to assume that
> whatever is installed on your system is the right thing.  What if I
> needed different versions of wxWidgets for other developement work and
> also wanted to build kicad with a different version?  It seems perfectly
> reasonable to build wxPython specifically for kicad.

It is.  I do it all the time.  I build and install the latest versions
wxPython, wxWidgets, Boost, etc. and set up my build environment to
build kicad against these custom builds without touching my default
system configuration.  The key action is the install and configure part.
 Just building the correct version of a dependency is not enough.

> 
> I also think that the build time and runtime behavior are being
> conflated.  There is nothing other than the version check that requires
> wxPython to ‘run’ at build time.  Prior to this it was enough to build
> it and put everything int the right place and then tell the python
> interpreter where to look a runtime.  At least that’s what’s been
> happening all along on OS X.

This has been happening on all platform all along and it has bitten
other devs because their wxWidgets and wxPythons version did not match
causing pcbnew to crash.  There was even a bug report filed against it.
 That is why the change was made.

> 
> This version check just assumes that it will be instaled on the system,
> and I think that’s wrong.

That's exactly what build configuration tools like CMake and autotools
are designed for not just creating Makefiles.  Why would you even
attempt to build any software if the prerequisites cannot be found on
your system?  How would you even know if the software was correctly
built?  You have been doing this manually except in the wrong order.

> 
> Garth
> 
> On Feb 15, 2015, at 4:16 PM, Wayne Stambaugh <stambaughw@xxxxxxxxx
> <mailto:stambaughw@xxxxxxxxx>> wrote:
>>
>> On 2/15/2015 7:06 PM, Garth Corral wrote:
>>> Well, yes, you’ve sort of explained the problem.  Unless wxPython is
>>> on the library path or using PYTHONPATH it isn’t going to work, and I
>>> don’t have wxPython installed on my system for any other purpose.
>>>  So, invoking the system python as is done in the version check isn’t
>>> going to work without first pointing it to a path that contains the
>>> wxPython library.
>>>
>>> I’ve been building wxPython as part of my kicad builds and passing
>>> -DPYTHON_SITE_PACKAGE_PATH to cmake with the built wxPython library.
>>>  Up to now this has worked for me.
>>
>> This should have never worked in the first place.  Would you expect
>> kicad to build if a valid version of wxWidgets or Boost could not be
>> found?  The build configuration should have always checked for a valid
>> install of wxPython before allowing you to build kicad with
>> -DKICAD_SCRIPTING_WXPYTHON=ON.  You will have to tell the python
>> interpreter where wxPython is installed before you configure the kicad
>> build.  I'm sorry for the inconvenience but you've been skating on thin
>> ice with the previous behavior.
>>
>>>
>>>
>>> Garth
>>>
>>>
>>>> On Feb 15, 2015, at 3:54 PM, Wayne Stambaugh <stambaughw@xxxxxxxxx
>>>> <mailto:stambaughw@xxxxxxxxx>> wrote:
>>>>
>>>> I'm confused.  How else should this work?  If configure your kicad build
>>>> to include wxPython, then one would expect the configuration to fail if
>>>> wxPython is not installed or the correct version.  Irregardless of where
>>>> wxPython is installed on your system, python still needs to know where
>>>> it is installed before you can use it either by installing wxPython into
>>>> your python library path, adding the path programmatically during python
>>>> scripting initialization, or using PTYHONPATH.
>>>>
>>>> On 2/15/2015 6:39 PM, Garth Corral wrote:
>>>>> I build wxPython as part of my kicad build.  So if you just invoke
>>>>> python and do, import wxversion, it will fail with an import error
>>>>> because it can’t find the module.  I’d need to set the python path
>>>>> to point to my built wxPython.  When all is compiled and installed,
>>>>> everything works because the libraries are moved into the right places.
>>>>>
>>>>> Garth
>>>>>
>>>>>> On Feb 15, 2015, at 3:36 PM, Wayne Stambaugh <stambaughw@xxxxxxxxx
>>>>>> <mailto:stambaughw@xxxxxxxxx>> wrote:
>>>>>>
>>>>>> If you don't have wxPython installed, how are you compiling with
>>>>>> KICAD_SCRIPTING_WXPYTHON=ON?  The wxPython configuration check and the
>>>>>> python scripting version selection initialization only happen when you
>>>>>> configure your build with KICAD_SCRIPTING_WXPYTHON=ON.
>>>>>>
>>>>>> On 2/15/2015 6:30 PM, Garth Corral wrote:
>>>>>>>
>>>>>>> Hmm…  So, unless I’m missing something, the new wxPython version
>>>>>>> check isn’t ever going to work for me.  I don’t have wxPython
>>>>>>> installed as part of my system install so importing wxversion is
>>>>>>> always going to fail unless I point it to my wxPython that I
>>>>>>> build as part of my kicad builds.  Anyone else experiencing this?
>>>>>>>
>>>>>>>
>>>>>>> Garth
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Mailing list: https://launchpad.net/~kicad-developers
>>>>>>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>>>>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>>>>>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Mailing list: https://launchpad.net/~kicad-developers
>>>>>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>>>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>>>>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Mailing list: https://launchpad.net/~kicad-developers
>>>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
> 



Follow ups

References