@@ -334,6 +334,8 @@ honoured.""",
334334 help = "Specify path to system BLAS directory. Use '--with-blas=download' to download openblas" )
335335 parser .add_argument ("--netgen" , action = "store_true" ,
336336 help = "Install NGSolve/Netgen and ngsPETSc." )
337+ parser .add_argument ("--no-vtk" , action = "store_true" ,
338+ help = "Do not install VTK into the Firedrake virtualenv" )
337339
338340 args = parser .parse_args ()
339341
@@ -1824,25 +1826,20 @@ if mode == "install":
18241826 log .info ("Pip installing %s to venv" % package )
18251827 run_pip_install_wrap (package .split (), {})
18261828
1827- # "Temporary" workaround for missing VTK wheel on Python 3.11
1828- if sys .version_info [:2 ] == (3 , 11 ):
1829- # Update source when release is no longer a draft
1830- source = "https://github.com/firedrakeproject/VTKPythonPackage/releases/download/firedrake_20221116/"
1831- if osname == "Darwin" :
1832- if arch == "arm64" :
1833- source += "vtk-9.2.2.dev0-cp311-cp311-macosx_12_0_arm64.whl "
1834- elif arch == "x86_64" :
1835- source += "vtk-9.2.2.dev0-cp311-cp311-macosx_12_0_x86_64.whl"
1836- else :
1837- log .error ("Cannot install VTK for Python 3.11: unknown Darwin architecture {0}." .format (arch ))
1838- raise InstallError ("Cannot install VTK for Python 3.11: unknown Darwin architecture {0}." .format (arch ))
1839- elif osname == "Linux" :
1840- source += "vtk-9.2.2.dev0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"
1841- else :
1842- log .error ("Cannot install VTK for Python 3.11: unknown operating system {0}." .format (osname ))
1843- raise InstallError ("Cannot install VTK for Python 3.11: unknown operating system {0}." .format (osname ))
1844- log .info ("Pip installing VTK for Python 3.11 to venv" )
1845- run_pip_install ([source ])
1829+ # numpy requires old setuptools (+wheel)
1830+ log .info ("Installing numpy using setuptools==59.2.0 and wheel==0.37.0 and Cython==0.29.36" )
1831+ log .info ("Installing numpy==1.24 due to performance regression" )
1832+ # https://github.com/inducer/pytential/issues/211
1833+ run_pip_install (["numpy==1.24" ])
1834+ log .info ("Updating setuptools and wheel to latest versions" )
1835+ run_pip (["install" , "-U" , "setuptools" ])
1836+ run_pip (["install" , "-U" , "wheel" ])
1837+
1838+ # Install VTK
1839+ if not args .no_vtk :
1840+ log .info ("Pip installing VTK to venv" )
1841+ run_pip_install_wrap (["vtk>=9.0.1" ], {})
1842+
18461843 if sys .version_info [:2 ] >= (3 , 9 ):
18471844 # Also lazy-object-proxy
18481845 run_pip (["install" , "lazy-object-proxy==1.4.*" ])
@@ -1889,15 +1886,6 @@ if mode == "install":
18891886 with environment (** compiler_env , ** link_env ):
18901887 run_pip_install (["--no-cache-dir" , "mpi4py" ])
18911888
1892- # numpy requires old setuptools (+wheel)
1893- log .info ("Installing numpy using setuptools==59.2.0 and wheel==0.37.0 and Cython==0.29.36" )
1894- log .info ("Installing numpy==1.24 due to performance regression" )
1895- # https://github.com/inducer/pytential/issues/211
1896- run_pip_install (["numpy==1.24" ])
1897- log .info ("Updating setuptools and wheel to latest versions" )
1898- run_pip (["install" , "-U" , "setuptools" ])
1899- run_pip (["install" , "-U" , "wheel" ])
1900-
19011889 for p in packages :
19021890 pip_requirements (p , compiler_env )
19031891
0 commit comments