← Back to team overview

kicad-developers team mailing list archive

Re: wxPython version check.

 

Ok, that works now.

I see it was sent off list, that was not intended, hence I will
forward it for others to find. Thank you.

2015-02-15 15:39 GMT+01:00 Wayne Stambaugh <stambaughw@xxxxxxxxx>:
> I had the same problem and had to run `make rebuild_cache` to get CMake
> to properly configure the wxPython version string.  To verify the
> correct wxPython version string is being created by CMake, run the
> following command from your build path:
>
> grep WXPYTHON < CMakeCache.txt
>
> you should see something like:
>
> KICAD_SCRIPTING_WXPYTHON:BOOL=ON
> WXPYTHON_VERSION_FOUND:STRING=3.0
>
> The value of WXPYTHON_VERSION_FOUND should be have the same major and
> minor version of the version as one of the versions of wxWidgets
> installed on your system.
>
> On 02/15/2015 06:56 AM, Nick Østergaard wrote:
>> Hi Wayne
>>
>> I think I have some problems related to this. I am on 5420.
>>
>> When I start pcbnew from commandline I get:
>> $ pcbnew
>> Traceback (most recent call last):
>>   File "<string>", line 1, in <module>
>>   File "/usr/lib/python2.7/site-packages/wxversion.py", line 149, in select
>>     bestMatch = _get_best_match(installed, versions, optionsRequired)
>>   File "/usr/lib/python2.7/site-packages/wxversion.py", line 273, in
>> _get_best_match
>>     score = pkg.Score(_wxPackageInfo(ver), optionsRequired)
>>   File "/usr/lib/python2.7/site-packages/wxversion.py", line 357, in __init__
>>     self.version = tuple([int(x) for x in segments[0].split('.')])
>> ValueError: invalid literal for int() with base 10: ''
>> ImportError: No module named wx._core_
>>
>> When I start the scripting console from the toolbar it segfaults. I
>> can provide a trace if nessesary.
>>
>> Also I get these error messages in an error dialog when pcbnew starts:
>>
>> 12:53:33: ***** Error importing the wxPython API! *****
>> 12:53:33: pcbnewInitPythonScripting() failed. (error 0: Success)
>>
>> If I try to import the module wx._core_ in python3 I get the import
>> error, if I do it in python2 the imoport works. It should be mentioned
>> that my default python is python3.
>>
>> I have the following installed on archlinux:
>> wxgtk 3.0.2
>> wxgtk2.8 2.8.12.1
>> wxpython 3.0.2.0
>> wxpython2.8 2.8.12.1
>>
>> Regards
>> Nick Østergaard
>>
>> 2015-02-15 1:42 GMT+01:00 Wayne Stambaugh <stambaughw@xxxxxxxxx>:
>>> I just committed code to fix the following wxPython issues:
>>>
>>> 1) Verify if wxPython is installed on the system when
>>> KICAD_SCRIPTING_WXPYTHON=ON and fail the build configuration when
>>> wxPython is not found.
>>>
>>> 2) Verify the major and minor versions of the wxPython match the major
>>> and minor versions of the found wxWidgets and fail the build
>>> configuration when the wxPython version does not match the wxWidgets
>>> version.  I did not test the micro version number because wxPython tends
>>> to lag wxWidgets and the micro version changes are according to
>>> wxWidgets only bug fixes so using the major and minor version numbers
>>> should be safe.
>>>
>>> 3) Add code to the python scripting initialization to select the
>>> appropriate version of wxPython.
>>>
>>> I tested this on windows and Linux and it seems to work but I do not
>>> have multiple versions of wxPython installed on either system.  If
>>> someone has multiple versions of wxPython on their system, please verify
>>> that this change fixes the problem.  I would also like one of the OSX
>>> devs to confirm that this didn't break anything on OSX.
>>>
>>> Thanks,
>>>
>>> Wayne
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help   : https://help.launchpad.net/ListHelp


Follow ups

References