Make sdc.py use explicit use python2
ClosedPublic

Authored by wicik on Jan 17 2016, 8:27 PM.

Details

Summary
Make sdc.py use explicit use python2
Fixes T1304

Diff Detail

Repository
R15 KDb
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
wicik updated this revision to Diff 1995.Jan 17 2016, 8:27 PM
wicik retitled this revision from to Make sdc.py use explicit use python2.
wicik updated this object.
wicik edited the test plan for this revision. (Show Details)
wicik added a reviewer: staniek.
wicik added a project: KDb.Jan 17 2016, 8:28 PM
staniek added inline comments.Jan 17 2016, 8:33 PM
cmake/modules/KDbCreateSharedDataClasses.cmake
42

I used 'python ${CMAKE_SOURCE_DIR}/tools/sdc.py' probably because of the Windows requirement. sdc.py wouldn't work.

So the change to python2 would belong here.

wicik updated this revision to Diff 2060.Jan 21 2016, 8:11 PM

python2 is used everywhere.

staniek accepted this revision.Jan 22 2016, 10:09 AM
staniek edited edge metadata.

Could you check if the standard Python 2 for Windows is python2.exe or python.exe? The sdc.py won't conflict, but the cmake COMMAND can. If that's the case, we need a condition in KDbCreateSharedDataClasses.cmake.

This revision is now accepted and ready to land.Jan 22 2016, 10:09 AM

PS: I migrated *.shared.h files of KDb locally to the new syntax and everything works. Please push this patch first.

wicik marked an inline comment as done.Jan 22 2016, 8:17 PM

about python2.exe: I'm going to rewrite entire macro(KDB_CREATE_SHARED_DATA_CLASSES) to be used as add_excutable/add_library, so i will produce "target", and then I'll check if ".exe" is required for windows.

This revision was automatically updated to reflect the committed changes.
In D832#16461, @wicik wrote:

about python2.exe: I'm going to rewrite entire macro(KDB_CREATE_SHARED_DATA_CLASSES) to be used as add_excutable/add_library, so i will produce "target", and then I'll check if ".exe" is required for windows.

That's appreciated! For now users need to remember about calling cmake . in the builddir every time a *shared.h file changes. Looking forward to proper cmake dependencies coded, they did not work for me last I tried to code them.