lol

python3Packages.fenics: drop (#431840)

authored by

Nick Cao and committed by
GitHub
d317b496 c7cefc46

+1 -365
-1
nixos/tests/all-tests.nix
··· 506 506 fanout = runTest ./fanout.nix; 507 507 fcitx5 = runTest ./fcitx5; 508 508 fedimintd = runTest ./fedimintd.nix; 509 - fenics = runTest ./fenics.nix; 510 509 ferm = runTest ./ferm.nix; 511 510 ferretdb = import ./ferretdb.nix { inherit pkgs runTest; }; 512 511 fider = runTest ./fider.nix;
-51
nixos/tests/fenics.nix
··· 1 - { pkgs, ... }: 2 - 3 - let 4 - fenicsScript = pkgs.writeScript "poisson.py" '' 5 - #!/usr/bin/env python 6 - from dolfin import * 7 - 8 - mesh = UnitSquareMesh(4, 4) 9 - V = FunctionSpace(mesh, "Lagrange", 1) 10 - 11 - def boundary(x): 12 - return x[0] < DOLFIN_EPS or x[0] > 1.0 - DOLFIN_EPS 13 - 14 - u0 = Constant(0.0) 15 - bc = DirichletBC(V, u0, boundary) 16 - 17 - u = TrialFunction(V) 18 - v = TestFunction(V) 19 - f = Expression("10*exp(-(pow(x[0] - 0.5, 2) + pow(x[1] - 0.5, 2)) / 0.02)", degree=2) 20 - g = Expression("sin(5*x[0])", degree=2) 21 - a = inner(grad(u), grad(v))*dx 22 - L = f*v*dx + g*v*ds 23 - 24 - u = Function(V) 25 - solve(a == L, u, bc) 26 - print(u) 27 - ''; 28 - in 29 - { 30 - name = "fenics"; 31 - meta = { 32 - maintainers = with pkgs.lib.maintainers; [ ]; 33 - }; 34 - 35 - nodes = { 36 - fenicsnode = 37 - { pkgs, ... }: 38 - { 39 - environment.systemPackages = with pkgs; [ 40 - gcc 41 - (python3.withPackages (ps: with ps; [ fenics ])) 42 - ]; 43 - }; 44 - }; 45 - testScript = 46 - { nodes, ... }: 47 - '' 48 - start_all() 49 - fenicsnode.succeed("${fenicsScript}") 50 - ''; 51 - }
-311
pkgs/development/python-modules/fenics/default.nix
··· 1 - { 2 - lib, 3 - stdenv, 4 - fetchurl, 5 - fetchpatch, 6 - blas, 7 - boost186, 8 - buildPythonPackage, 9 - cmake, 10 - doxygen, 11 - eigen, 12 - hdf5, 13 - isPy27, 14 - lapack, 15 - mpi, 16 - mpi4py, 17 - numpy, 18 - pkg-config, 19 - pkgconfig, 20 - ply, 21 - pybind11, 22 - pytest, 23 - python, 24 - scotch, 25 - setuptools, 26 - six, 27 - sphinx, 28 - suitesparse, 29 - swig, 30 - sympy, 31 - zlib, 32 - nixosTests, 33 - }: 34 - 35 - let 36 - version = "2019.1.0"; 37 - 38 - dijitso = buildPythonPackage { 39 - pname = "dijitso"; 40 - inherit version; 41 - format = "setuptools"; 42 - src = fetchurl { 43 - url = "https://bitbucket.org/fenics-project/dijitso/downloads/dijitso-${version}.tar.gz"; 44 - sha256 = "1ncgbr0bn5cvv16f13g722a0ipw6p9y6p4iasxjziwsp8kn5x97a"; 45 - }; 46 - propagatedBuildInputs = [ 47 - numpy 48 - six 49 - ]; 50 - nativeCheckInputs = [ pytest ]; 51 - preCheck = '' 52 - export HOME=$PWD 53 - ''; 54 - checkPhase = '' 55 - runHook preCheck 56 - py.test test/ 57 - runHook postCheck 58 - ''; 59 - meta = { 60 - description = "Distributed just-in-time shared library building"; 61 - homepage = "https://fenicsproject.org/"; 62 - platforms = lib.platforms.all; 63 - license = lib.licenses.lgpl3; 64 - }; 65 - }; 66 - 67 - fiat = buildPythonPackage { 68 - pname = "fiat"; 69 - inherit version; 70 - format = "setuptools"; 71 - src = fetchurl { 72 - url = "https://bitbucket.org/fenics-project/fiat/downloads/fiat-${version}.tar.gz"; 73 - sha256 = "1sbi0fbr7w9g9ajr565g3njxrc3qydqjy3334vmz5xg0rd3106il"; 74 - }; 75 - propagatedBuildInputs = [ 76 - numpy 77 - six 78 - sympy 79 - ]; 80 - nativeCheckInputs = [ pytest ]; 81 - 82 - preCheck = '' 83 - # Workaround pytest 4.6.3 issue. 84 - # See: https://bitbucket.org/fenics-project/fiat/pull-requests/59 85 - rm test/unit/test_quadrature.py 86 - rm test/unit/test_reference_element.py 87 - rm test/unit/test_fiat.py 88 - 89 - # Fix `np.float` deprecation in Numpy 1.20 90 - grep -lr 'np.float(' test/ | while read -r fn; do 91 - substituteInPlace "$fn" \ 92 - --replace "np.float(" "np.float64(" 93 - done 94 - ''; 95 - checkPhase = '' 96 - runHook preCheck 97 - py.test test/unit/ 98 - runHook postCheck 99 - ''; 100 - meta = { 101 - description = "Automatic generation of finite element basis functions"; 102 - homepage = "https://fenicsproject.org/"; 103 - platforms = lib.platforms.all; 104 - license = lib.licenses.lgpl3; 105 - }; 106 - }; 107 - 108 - ufl = buildPythonPackage { 109 - pname = "ufl"; 110 - inherit version; 111 - format = "setuptools"; 112 - src = fetchurl { 113 - url = "https://bitbucket.org/fenics-project/ufl/downloads/ufl-${version}.tar.gz"; 114 - sha256 = "04daxwg4y9c51sdgvwgmlc82nn0fjw7i2vzs15ckdc7dlazmcfi1"; 115 - }; 116 - propagatedBuildInputs = [ 117 - numpy 118 - six 119 - ]; 120 - nativeCheckInputs = [ pytest ]; 121 - checkPhase = '' 122 - runHook preCheck 123 - py.test test/ 124 - runHook postCheck 125 - ''; 126 - meta = { 127 - description = "Domain-specific language for finite element variational forms"; 128 - homepage = "https://fenicsproject.org/"; 129 - platforms = lib.platforms.all; 130 - license = lib.licenses.lgpl3; 131 - }; 132 - }; 133 - 134 - ffc = buildPythonPackage { 135 - pname = "ffc"; 136 - inherit version; 137 - format = "setuptools"; 138 - src = fetchurl { 139 - url = "https://bitbucket.org/fenics-project/ffc/downloads/ffc-${version}.tar.gz"; 140 - sha256 = "1zdg6pziss4va74pd7jjl8sc3ya2gmhpypccmyd8p7c66ji23y2g"; 141 - }; 142 - patches = [ 143 - (fetchpatch { 144 - name = "fenics-ffc-numpy2-compat.patch"; 145 - url = "https://bitbucket.org/fenics-project/ffc/commits/245d15115b35b5ac091251fe6c84cc6474704b3c/raw"; 146 - hash = "sha256-TcLQZ44C+uR2ryxtCBjR/5Tjn7B0S4MqoYi0nlP8JwI="; 147 - }) 148 - ]; 149 - nativeBuildInputs = [ pybind11 ]; 150 - propagatedBuildInputs = [ 151 - dijitso 152 - fiat 153 - numpy 154 - six 155 - sympy 156 - ufl 157 - setuptools 158 - ]; 159 - nativeCheckInputs = [ pytest ]; 160 - preCheck = '' 161 - export HOME=$PWD 162 - rm test/unit/ufc/finite_element/test_evaluate.py 163 - ''; 164 - checkPhase = '' 165 - runHook preCheck 166 - py.test test/unit/ 167 - runHook postCheck 168 - ''; 169 - meta = { 170 - description = "Compiler for finite element variational forms"; 171 - homepage = "https://fenicsproject.org/"; 172 - platforms = lib.platforms.all; 173 - license = lib.licenses.lgpl3; 174 - }; 175 - }; 176 - dolfin = stdenv.mkDerivation { 177 - pname = "dolfin"; 178 - inherit version; 179 - src = fetchurl { 180 - url = "https://bitbucket.org/fenics-project/dolfin/downloads/dolfin-${version}.tar.gz"; 181 - sha256 = "0kbyi4x5f6j4zpasch0swh0ch81w2h92rqm1nfp3ydi4a93vky33"; 182 - }; 183 - patches = [ 184 - (fetchpatch { 185 - name = "fix-double-prefix.patch"; 186 - url = "https://bitbucket.org/josef_kemetmueller/dolfin/commits/328e94acd426ebaf2243c072b806be3379fd4340/raw"; 187 - sha256 = "1zj7k3y7vsx0hz3gwwlxhq6gdqamqpcw90d4ishwx5ps5ckcsb9r"; 188 - }) 189 - (fetchpatch { 190 - url = "https://bitbucket.org/fenics-project/dolfin/issues/attachments/1116/fenics-project/dolfin/1602778118.04/1116/0001-Use-__BYTE_ORDER__-instead-of-removed-Boost-endian.h.patch"; 191 - hash = "sha256-wPaDmPU+jaD3ce3nNEbvM5p8e3zBdLozamLTJ/0ai2c="; 192 - }) 193 - (fetchpatch { 194 - name = "fenics-boost-filesystem-1.85-compat.patch."; 195 - url = "https://bitbucket.org/sblauth/dolfin/commits/16fa03887b3e9ec417c484ddf92db104cb9a93f9/raw"; 196 - hash = "sha256-ZMKfzeWlPre88cKzrj04Tj+nQWS4ixat0bBvyt3TJmk="; 197 - }) 198 - ]; 199 - # https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=dolfin&id=a965ad934f7b3d49a5e77fa6fb5e3c710ec2163e 200 - postPatch = '' 201 - sed -i '20 a #include <algorithm>' dolfin/geometry/IntersectionConstruction.cpp 202 - sed -i '26 a #include <algorithm>' dolfin/mesh/MeshFunction.h 203 - sed -i '25 a #include <cstdint>' dolfin/mesh/MeshConnectivity.h 204 - ''; 205 - propagatedBuildInputs = [ 206 - dijitso 207 - fiat 208 - numpy 209 - six 210 - ufl 211 - ]; 212 - nativeBuildInputs = [ 213 - cmake 214 - doxygen 215 - pkg-config 216 - ]; 217 - buildInputs = [ 218 - boost186 219 - dijitso 220 - eigen 221 - ffc 222 - fiat 223 - hdf5 224 - mpi 225 - numpy 226 - blas 227 - lapack 228 - ply 229 - python 230 - scotch 231 - six 232 - sphinx 233 - suitesparse 234 - swig 235 - sympy 236 - ufl 237 - zlib 238 - ]; 239 - cmakeFlags = [ 240 - "-DDOLFIN_CXX_FLAGS=-std=c++11" 241 - "-DDOLFIN_AUTO_DETECT_MPI=ON" 242 - "-DDOLFIN_ENABLE_CHOLMOD=ON" 243 - "-DDOLFIN_ENABLE_DOCS=ON" 244 - "-DDOLFIN_ENABLE_HDF5=ON" 245 - "-DDOLFIN_ENABLE_MPI=ON" 246 - "-DDOLFIN_ENABLE_SCOTCH=ON" 247 - "-DDOLFIN_ENABLE_UMFPACK=ON" 248 - "-DDOLFIN_ENABLE_ZLIB=ON" 249 - "-DDOLFIN_SKIP_BUILD_TESTS=ON" # Otherwise SCOTCH is not found 250 - # TODO: Enable the following features 251 - "-DDOLFIN_ENABLE_PARMETIS=OFF" 252 - "-DDOLFIN_ENABLE_PETSC=OFF" 253 - "-DDOLFIN_ENABLE_SLEPC=OFF" 254 - "-DDOLFIN_ENABLE_TRILINOS=OFF" 255 - ]; 256 - installCheckPhase = '' 257 - source $out/share/dolfin/dolfin.conf 258 - make runtests 259 - ''; 260 - meta = { 261 - description = "FEniCS Problem Solving Environment in Python and C++"; 262 - homepage = "https://fenicsproject.org/"; 263 - license = lib.licenses.lgpl3; 264 - }; 265 - }; 266 - python-dolfin = buildPythonPackage rec { 267 - pname = "dolfin"; 268 - inherit version; 269 - format = "setuptools"; 270 - disabled = isPy27; 271 - src = dolfin.src; 272 - sourceRoot = "${pname}-${version}/python"; 273 - nativeBuildInputs = [ 274 - pybind11 275 - cmake 276 - ]; 277 - dontUseCmakeConfigure = true; 278 - preConfigure = '' 279 - export CMAKE_PREFIX_PATH=${pybind11}/share/cmake/pybind11:$CMAKE_PREFIX_PATH 280 - substituteInPlace setup.py --replace "pybind11==2.2.4" "pybind11" 281 - substituteInPlace dolfin/jit/jit.py \ 282 - --replace 'pkgconfig.exists("dolfin")' 'pkgconfig.exists("${dolfin}/lib/pkgconfig/dolfin.pc")' \ 283 - --replace 'pkgconfig.parse("dolfin")' 'pkgconfig.parse("${dolfin}/lib/pkgconfig/dolfin.pc")' 284 - ''; 285 - buildInputs = [ 286 - dolfin 287 - boost186 288 - ]; 289 - 290 - propagatedBuildInputs = [ 291 - dijitso 292 - ffc 293 - mpi4py 294 - numpy 295 - ufl 296 - pkgconfig 297 - pybind11 298 - ]; 299 - doCheck = false; # Tries to orte_ess_init and call ssh to localhost 300 - passthru.tests = { 301 - inherit (nixosTests) fenics; 302 - }; 303 - meta = { 304 - description = "Python bindings for the DOLFIN FEM compiler"; 305 - homepage = "https://fenicsproject.org/"; 306 - platforms = lib.platforms.all; 307 - license = lib.licenses.lgpl3; 308 - }; 309 - }; 310 - in 311 - python-dolfin
+1
pkgs/top-level/python-aliases.nix
··· 253 253 fastpair = throw "fastpair is unmaintained upstream and has therefore been removed"; # added 2024-05-01 254 254 faulthandler = throw "faulthandler is built into ${python.executable}"; # added 2021-07-12 255 255 inherit (super.pkgs) fetchPypi; # added 2023-05-25 256 + fenics = throw "fenics has been removed, use fenics-dolfinx instead"; # added 2025-08-07 256 257 filebrowser_safe = filebrowser-safe; # added 2024-01-03 257 258 filemagic = throw "inactive since 2014, so use python-magic instead"; # added 2022-11-19 258 259 flaskbabel = flask-babel; # added 2023-01-19
-2
pkgs/top-level/python-packages.nix
··· 5055 5055 5056 5056 feedparser = callPackage ../development/python-modules/feedparser { }; 5057 5057 5058 - fenics = callPackage ../development/python-modules/fenics { hdf5 = pkgs.hdf5_1_10; }; 5059 - 5060 5058 fenics-basix = callPackage ../development/python-modules/fenics-basix { }; 5061 5059 5062 5060 fenics-dolfinx = callPackage ../development/python-modules/fenics-dolfinx { };