Python binaries

  • 3 Replies
  • 1920 Views
Python binaries
« on: December 08, 2020, 11:10:27 PM »
The .pyd files are built using Python 2.7. Is there any way to build this in Python 3 ourselves?
I suppose the .so files are also Python 2.7

*

David

  • *
  • 10
    • View Profile
Re: Python binaries
« Reply #1 on: December 22, 2020, 05:46:35 PM »
Hi,

Yes, you can recompile. We chose Python 2.7 becouse it is more conveniant to build cross platform on MAC and Linux besides Windows from single source base. The easiest on Window. Download Python 3 source and rebuild. However you will have to tweak a few things. We had a working Python 3 build sometime back in development. If you decide to recompile please post here any open issues you encounter.

One thing to note  is that the new version of ScopeFun software is in development.  There will be changes in the software and besides other things we will switch to Lua as an embeded script language. The software will execute Lua scripts on captured frame, displayed frame, per sample  ... etc.

Best Regards,
David
« Last Edit: December 22, 2020, 05:56:50 PM by David »

Re: Python binaries
« Reply #2 on: January 25, 2021, 10:30:53 PM »
Sorry. I'm not very familiar with CMake and so on.  What should be the steps for me to recompile it to Python3?
  • I've tried downloading the Python3, decompressed it and pasting the files (Linux) to the scopefun-software/lib directory.
  • Modified the CMakeLists.txt in the scopefun-software/lib directory to point to Python3.7.9 instead of Python2.7.16
However the compiled library "_scopfunapi.so" in the "scopefun-software/bin" is still compiled under Python2.
Am I missing something?
« Last Edit: January 25, 2021, 10:41:48 PM by jeremyp »

Re: Python binaries
« Reply #3 on: January 25, 2021, 11:06:32 PM »
Never mind, I was able to do it.
Found out that I also needed to edit the files
  • sfApi.cmake
  • sfLibs.cmake
in the scopefun-software/source directory to point to the correct Python path.