gnu: python-dolfin-adjoint: Swap to pyproject-build-system.
* gnu/packages/simulation.scm (python-dolfin-adjoint) [source]: Remove trailing #t from snippet. [build-system]: Swap to pyproject-build-system. [arguments]: Apply G-expressions. <#:phases>: Swap back to defaul 'check phase. python-dolfin-adjoint Change-Id: Idf100b718b44d9d6695e598c434fbbac55a38845
This commit is contained in:
		
							parent
							
								
									9da142540e
								
							
						
					
					
						commit
						72024ae490
					
				
					 1 changed files with 27 additions and 34 deletions
				
			
		| 
						 | 
					@ -1187,8 +1187,7 @@ command-line utility for mesh optimisation.")
 | 
				
			||||||
             (commit version)))
 | 
					             (commit version)))
 | 
				
			||||||
       (file-name (git-file-name name version))
 | 
					       (file-name (git-file-name name version))
 | 
				
			||||||
       (sha256
 | 
					       (sha256
 | 
				
			||||||
        (base32
 | 
					        (base32 "0xhy76a5f33hz94wc9g2mc5qmwkxfccbbc6yxl7psm130afp8lhn"))
 | 
				
			||||||
         "0xhy76a5f33hz94wc9g2mc5qmwkxfccbbc6yxl7psm130afp8lhn"))
 | 
					 | 
				
			||||||
       (modules '((guix build utils)))
 | 
					       (modules '((guix build utils)))
 | 
				
			||||||
       (snippet
 | 
					       (snippet
 | 
				
			||||||
        '(begin
 | 
					        '(begin
 | 
				
			||||||
| 
						 | 
					@ -1201,33 +1200,27 @@ command-line utility for mesh optimisation.")
 | 
				
			||||||
               (("\\\"mpirun\\\", \\\"-n\\\", \\\"2\\\", ") "")))
 | 
					               (("\\\"mpirun\\\", \\\"-n\\\", \\\"2\\\", ") "")))
 | 
				
			||||||
           ;; Result files are regenerated in the check phase.
 | 
					           ;; Result files are regenerated in the check phase.
 | 
				
			||||||
           (delete-file-recursively
 | 
					           (delete-file-recursively
 | 
				
			||||||
            "tests/migration/viscoelasticity/test-results")
 | 
					            "tests/migration/viscoelasticity/test-results")))))
 | 
				
			||||||
           #t))))
 | 
					    (build-system pyproject-build-system)
 | 
				
			||||||
    (build-system python-build-system)
 | 
					 | 
				
			||||||
    (arguments
 | 
					    (arguments
 | 
				
			||||||
     `(#:phases
 | 
					     (list
 | 
				
			||||||
       (modify-phases %standard-phases
 | 
					      #:test-flags
 | 
				
			||||||
         (add-after 'build 'mpi-setup
 | 
					      #~(list "tests/fenics_adjoint"
 | 
				
			||||||
           ,%openmpi-setup)
 | 
					              "tests/migration"
 | 
				
			||||||
 | 
					              "tests/pyadjoint"
 | 
				
			||||||
 | 
					              "-k" "not test_read_checkpoint")
 | 
				
			||||||
 | 
					      #:phases
 | 
				
			||||||
 | 
					      #~(modify-phases %standard-phases
 | 
				
			||||||
 | 
					          (add-after 'build 'mpi-setup #$%openmpi-setup)
 | 
				
			||||||
 | 
					          (add-before 'check 'set-environment-variables
 | 
				
			||||||
 | 
					            (lambda _
 | 
				
			||||||
 | 
					              (setenv "HOME" "/tmp")))
 | 
				
			||||||
          (add-after 'install 'install-doc
 | 
					          (add-after 'install 'install-doc
 | 
				
			||||||
           (lambda* (#:key outputs #:allow-other-keys)
 | 
					            (lambda _
 | 
				
			||||||
             (let* ((doc (string-append (assoc-ref outputs "out")
 | 
					              (let* ((doc (string-append #$output "/share/doc/" #$name "-" #$version))
 | 
				
			||||||
                                        "/share/doc/" ,name "-"
 | 
					 | 
				
			||||||
                                        ,version))
 | 
					 | 
				
			||||||
                     (examples (string-append doc "/examples")))
 | 
					                     (examples (string-append doc "/examples")))
 | 
				
			||||||
                (mkdir-p examples)
 | 
					                (mkdir-p examples)
 | 
				
			||||||
               (copy-recursively "examples" examples))
 | 
					                (copy-recursively "examples" examples))))
 | 
				
			||||||
             #t))
 | 
					 | 
				
			||||||
         (replace 'check
 | 
					 | 
				
			||||||
           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
 | 
					 | 
				
			||||||
             (when tests?
 | 
					 | 
				
			||||||
               (add-installed-pythonpath inputs outputs)
 | 
					 | 
				
			||||||
               (setenv "HOME" (getcwd))
 | 
					 | 
				
			||||||
               (and (invoke "py.test" "-v" "tests/fenics_adjoint"
 | 
					 | 
				
			||||||
                            "-k" "not test_read_checkpoint")
 | 
					 | 
				
			||||||
                    (invoke "py.test" "-v" "tests/migration")
 | 
					 | 
				
			||||||
                    (invoke "py.test" "-v" "tests/pyadjoint")))
 | 
					 | 
				
			||||||
             #t))
 | 
					 | 
				
			||||||
          ;; Remove 'sanity-check, because it tries to import
 | 
					          ;; Remove 'sanity-check, because it tries to import
 | 
				
			||||||
          ;; firedrake_adjoint after importing fenics_adjoint.
 | 
					          ;; firedrake_adjoint after importing fenics_adjoint.
 | 
				
			||||||
          ;; Both load a module named 'backend' and firedrake_adjoint
 | 
					          ;; Both load a module named 'backend' and firedrake_adjoint
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue