<html><head><style>body{font-family:Merriweather,Arial;font-size:13px}</style></head><body><div style="font-family:Merriweather,Arial;font-size:13px; color: rgba(51,51,51,1.0); ">Hello, </div><div style="font-family:Merriweather,Arial;font-size:13px; color: rgba(51,51,51,1.0); ">I’m trying to set paraview python variants programmatically (each of them conflicts with the others). I’m not a TCL ninja so I came out with the code below, but I’m getting error of the type: "Warning: Variant python27 conflicts with non-existing variant python35 python36 python37” for all the variant combinations. How do I set variants programmatically?</div><div style="font-family:Merriweather,Arial;font-size:13px; color: rgba(51,51,51,1.0); "> </div><div style="font-family:Merriweather,Arial;font-size:13px; color: rgba(51,51,51,1.0); "><br></div><div style="font-family:Merriweather,Arial;font-size:13px; color: rgba(51,51,51,1.0); ">```</div><div style="font-family:Merriweather,Arial;font-size:13px; color: rgba(51,51,51,1.0); "><div style="margin: 0px;"># Supported pythons</div><div style="margin: 0px;">set python_versions {27 35 36 37}</div><div style="margin: 0px;"><br></div><div style="margin: 0px;">foreach pyver ${python_versions} {</div><div style="margin: 0px;"> # Conflicting python versions</div><div style="margin: 0px;"> set other_python_versions {}</div><div style="margin: 0px;"> foreach other_pyver ${python_versions} {</div><div style="margin: 0px;"> if {${other_pyver} ne ${pyver}} {</div><div style="margin: 0px;"> if {${other_pyver} ni ${other_python_versions}} {</div><div style="margin: 0px;"> lappend other_python_versions python${other_pyver}</div><div style="margin: 0px;"> }</div><div style="margin: 0px;"> }</div><div style="margin: 0px;"> }</div><div style="margin: 0px;"><br></div><div style="margin: 0px;"> # Get python branch</div><div style="margin: 0px;"> set python_branch {[string range ${pyver} 0 end-1].[string index ${pyver} end]}</div><div style="margin: 0px;"><br></div><div style="margin: 0px;"> variant python${pyver} conflicts [join ${other_python_versions} " "] description {Add Python ${python_branch} support.} {</div><div style="margin: 0px;"> depends_lib-append port:py${pyver}-matplotlib</div><div style="margin: 0px;"> configure.args-append \</div><div style="margin: 0px;"> -DPARAVIEW_ENABLE_PYTHON:BOOL=ON \</div><div style="margin: 0px;"> -DPYTHON_EXECUTABLE=${prefix}/bin/python${python_branch} \</div><div style="margin: 0px;"> -DPYTHON_INCLUDE_DIR=${frameworks_dir}/Python.framework/Versions/${python_branch}/Headers/ \</div><div style="margin: 0px;"> -DPYTHON_LIBRARY=${prefix}/lib/libpython${python_branch}.dylib</div><div style="margin: 0px;"><br></div><div style="margin: 0px;"> if {[mpi_variant_isset]} {</div><div style="margin: 0px;"> depends_lib-append port:py${pyver}-mpi4py</div><div style="margin: 0px;"> configure.args-append \</div><div style="margin: 0px;"> -DVTK_USE_SYSTEM_MPI4PY:BOOL=ON</div><div style="margin: 0px;"> }</div><div style="margin: 0px;"> }</div><div style="margin: 0px;"> </div><div style="margin: 0px;">}</div><div style="margin: 0px;"><br></div><div style="margin: 0px;">foreach pyver ${python_versions} {</div><div style="margin: 0px;"> if {[variant_isset python${pyver}]} {</div><div style="margin: 0px;"> notes-append\</div><div style="margin: 0px;"> "\n Currently Paraview installs as an app, including the Python modules. To use with MacPorts Python, add ${applications_dir}/paraview.app/Contents/Python/:${applications_dir}/paraview.app/Contents/Libraries/ to PYTHONPATH and ${applications_dir}/paraview.app/Contents/Libraries/ to DYLD_LIBRARY_PATH. Also, simultaneous use of independent vtk libraries, e.g. with Mayavi, may result in segfault."</div><div style="margin: 0px;"> }</div><div style="margin: 0px;"><br></div><div style="margin: 0px;">}</div></div><div style="font-family:Merriweather,Arial;font-size:13px; color: rgba(51,51,51,1.0); ">```</div><br><div class="gmail_signature">
<title></title>
<pre> _
-. .´ |∞∞∞∞
', ; |∞∞∞∞∞∞
˜˜ |∞∞∞∞∞∞∞∞∞ RdB
,., |∞∞∞∞∞∞
.' '. |∞∞∞∞
-' `’
https://rdb.is
</pre>
</div></body></html>