← Back to team overview

yade-dev team mailing list archive

[Bug 1802913] Re: Find Module package and Python 3

 

> the choice of the python environment to use
> for generating and using Yade has to be defined in the option of cmake

That's what I think indeed. Either "export" variables before cmake, or define system-wide priorities among the different versions of library (possible in ubuntu, maybe not in opensuse), or pass relevant flags to cmake.
Either way it is to be fixed on user side, not in yade's source code, as I see it.

As you are probably aware "#!/usr/bin/python3.6" is not in the source
code. The first line in sources is #!${pyExecutable} [1]. We can't do
much more.

I'm marking the bug as "won't fix" for the moment as it seems very
specific and I can't imagine a general solution. Feel free to ping us
here if you think there is still possible improvement.

Bruno

[1] https://github.com/yade/trunk/blob/master/core/main/main.py.in

** Changed in: yade
       Status: New => Won't Fix

-- 
You received this bug notification because you are a member of Yade
developers, which is subscribed to Yade.
https://bugs.launchpad.net/bugs/1802913

Title:
  Find Module package and Python 3

Status in Yade:
  Won't Fix

Bug description:
  I am using OpenSuse Leap 15.0 and the trunk.git distribution of Yade

  so when I want to create the Makefile from the cMake command on a machine using by default python 3 (python 3.6) the Cmake uses the  trunk/CMakeLists.txt and at the lines 
  "find_python_module(minieigen REQUIRED)
  find_python_module(Tkinter REQUIRED)"

  the command stops at the subroutine FindPythonModule.cmake which is using by default the active python which does not located the right module even if they are installed!! see below
  ./python3.6/site-packages/minieigen-0.5.4-py3.6.egg-info
  ./python3.6/site-packages/minieigen.cpython-36m-x86_64-linux-gnu.so
  ./python2.7/site-packages/minieigen.so
  ./python2.7/site-packages/minieigen-0.5.4-py2.7.egg-info

  I had to modify the command line in the module to force python2:

  #  EXECUTE_PROCESS(COMMAND "${PYTHON_EXECUTABLE}" "-c" 
   EXECUTE_PROCESS(COMMAND python2 "-c" 

  Luc

To manage notifications about this bug go to:
https://bugs.launchpad.net/yade/+bug/1802913/+subscriptions


References