@@ -328,6 +328,8 @@ honoured.""",
328328 help = "Specify path to system BLAS directory. Use '--with-blas=download' to download openblas" )
329329 parser .add_argument ("--netgen" , action = "store_true" ,
330330 help = "Install NGSolve/Netgen and ngsPETSc." )
331+ parser .add_argument ("--no-vtk" , action = "store_true" ,
332+ help = "Do not install VTK into the Firedrake virtualenv" )
331333
332334 args = parser .parse_args ()
333335
@@ -1853,25 +1855,20 @@ if mode == "install":
18531855 log .info ("Pip installing %s to venv" % package )
18541856 run_pip_install_wrap (package .split (), {})
18551857
1856- # "Temporary" workaround for missing VTK wheel on Python 3.11
1857- if sys .version_info [:2 ] == (3 , 11 ):
1858- # Update source when release is no longer a draft
1859- source = "https://github.com/firedrakeproject/VTKPythonPackage/releases/download/firedrake_20221116/"
1860- if osname == "Darwin" :
1861- if arch == "arm64" :
1862- source += "vtk-9.2.2.dev0-cp311-cp311-macosx_12_0_arm64.whl "
1863- elif arch == "x86_64" :
1864- source += "vtk-9.2.2.dev0-cp311-cp311-macosx_12_0_x86_64.whl"
1865- else :
1866- log .error ("Cannot install VTK for Python 3.11: unknown Darwin architecture {0}." .format (arch ))
1867- raise InstallError ("Cannot install VTK for Python 3.11: unknown Darwin architecture {0}." .format (arch ))
1868- elif osname == "Linux" :
1869- source += "vtk-9.2.2.dev0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"
1870- else :
1871- log .error ("Cannot install VTK for Python 3.11: unknown operating system {0}." .format (osname ))
1872- raise InstallError ("Cannot install VTK for Python 3.11: unknown operating system {0}." .format (osname ))
1873- log .info ("Pip installing VTK for Python 3.11 to venv" )
1874- run_pip_install ([source ])
1858+ # numpy requires old setuptools (+wheel)
1859+ log .info ("Installing numpy using setuptools==59.2.0 and wheel==0.37.0 and Cython==0.29.36" )
1860+ log .info ("Installing numpy==1.24 due to performance regression" )
1861+ # https://github.com/inducer/pytential/issues/211
1862+ run_pip_install (["numpy==1.24" ])
1863+ log .info ("Updating setuptools and wheel to latest versions" )
1864+ run_pip (["install" , "-U" , "setuptools" ])
1865+ run_pip (["install" , "-U" , "wheel" ])
1866+
1867+ # Install VTK
1868+ if not args .no_vtk :
1869+ log .info ("Pip installing VTK to venv" )
1870+ run_pip_install_wrap (["vtk>=9.0.1" ], {})
1871+
18751872 if sys .version_info [:2 ] >= (3 , 9 ):
18761873 # Also lazy-object-proxy
18771874 run_pip (["install" , "lazy-object-proxy==1.4.*" ])
@@ -1917,15 +1914,6 @@ if mode == "install":
19171914 with environment (** compiler_env , ** link_env ):
19181915 run_pip_install (["--no-cache-dir" , "mpi4py" ])
19191916
1920- # numpy requires old setuptools (+wheel)
1921- log .info ("Installing numpy using setuptools==59.2.0 and wheel==0.37.0 and Cython==0.29.36" )
1922- log .info ("Installing numpy==1.24 due to performance regression" )
1923- # https://github.com/inducer/pytential/issues/211
1924- run_pip_install (["numpy==1.24" ])
1925- log .info ("Updating setuptools and wheel to latest versions" )
1926- run_pip (["install" , "-U" , "setuptools" ])
1927- run_pip (["install" , "-U" , "wheel" ])
1928-
19291917 for p in packages :
19301918 pip_requirements (p , compiler_env )
19311919
0 commit comments