gnu: python-testpath: Fix library location for python2 version.
* gnu/packages/python.scm (python-testpath)[arguments]: Install module in the proper "lib/pythonx.y" location for all Python versions. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
This commit is contained in:
		
							parent
							
								
									2aa6d3aeeb
								
							
						
					
					
						commit
						b320f7bf06
					
				
					 1 changed files with 16 additions and 10 deletions
				
			
		| 
						 | 
				
			
			@ -5183,17 +5183,23 @@ installing @code{kernelspec}s for use with Jupyter frontends.")
 | 
			
		|||
    (build-system python-build-system)
 | 
			
		||||
    (arguments
 | 
			
		||||
     `(#:tests? #f ; this package does not even have a setup.py
 | 
			
		||||
       #:modules ((guix build python-build-system)
 | 
			
		||||
                  (guix build utils)
 | 
			
		||||
                  (srfi srfi-1))
 | 
			
		||||
       #:imported-modules (,@%python-build-system-modules
 | 
			
		||||
                           (srfi srfi-1))
 | 
			
		||||
       #:phases
 | 
			
		||||
       (modify-phases %standard-phases
 | 
			
		||||
         (delete 'install)
 | 
			
		||||
         (replace 'build
 | 
			
		||||
           (lambda* (#:key inputs outputs #:allow-other-keys)
 | 
			
		||||
                    (let ((dir (string-append
 | 
			
		||||
             (let* ((version (last
 | 
			
		||||
                              (string-split (assoc-ref inputs "python") #\-)))
 | 
			
		||||
                    (x.y (string-join (take (string-split version #\.) 2)
 | 
			
		||||
                                        "."))
 | 
			
		||||
                    (dir (string-append
 | 
			
		||||
                          (assoc-ref outputs "out")
 | 
			
		||||
                                "/lib/python"
 | 
			
		||||
                                (string-take (string-take-right
 | 
			
		||||
                                              (assoc-ref inputs "python") 5) 3)
 | 
			
		||||
                                "/site-packages/testpath")))
 | 
			
		||||
                          "/lib/python" x.y "/site-packages/testpath")))
 | 
			
		||||
               (mkdir-p dir)
 | 
			
		||||
               (copy-recursively "testpath" dir))
 | 
			
		||||
             #t)))))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Reference in a new issue