right way is package name

This commit is contained in:
Yann Dupont 2023-10-05 10:43:46 +02:00
parent 892c3321b0
commit 192e252ce2
2 changed files with 97 additions and 23 deletions

View file

@ -21,6 +21,9 @@
#:use-module (guix-science-nonfree packages linux)
#:use-module (guix-science-nonfree packages cuda)
#:use-module (guix utils)
#:use-module (guix git-download)
#:use-module (guix build-system pyproject)
)
@ -84,35 +87,39 @@
(name "python-seisbench")
(version "0.3.2")
(source (origin
(method url-fetch)
(uri (pypi-uri "seisbench" version))
; (method url-fetch)
(method git-fetch)
(uri (git-reference
(url "https://github.com/seisbench/seisbench")
(commit (string-append "v" version))))
; (uri (pypi-uri "seisbench" version))
; (patches (search-patches "glicid-non-free/glicid-tainted/packages/patches/seisbench-version-and-data.patch"))))))
(sha256
(base32
"1n04pr8ri06q6ngyi8wnw13vhhw2w7kkhn87zrkbjjw49v157xzg"))))
(build-system python-build-system)
(arguments
; "1n04pr8ri06q6ngyi8wnw13vhhw2w7kkhn87zrkbjjw49v157xzg"
"0jf0s17lrbdcj18wzfbmg37gknay854mfnnmshh4il9xakph1s0g"
))))
(build-system python-build-system)
(arguments
(list
#:phases
#~(modify-phases %standard-phases
(delete 'check)
(delete 'sanity-check)
; (add-before 'build 'pretend-version
;; The version string is usually derived via setuptools-scm, but
;; without the git metadata available, the version string is set to
;; '0.0.0'.
; (lambda _
; (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version)
; (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" "0.3.2")
; #$(package-version this-package)
(add-after 'unpack 'pretend-version
(lambda _
(setenv "SETUPTOOLS_SCM_PRETEND_VERSION"
#$(package-version this-package))))
(add-before 'build 'pretend-version
;; The version string is usually derived via setuptools-scm, but
;; it doesn't work without the .git directory.
(lambda _
(setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version))))))
;)))
)))
; (delete 'check)
; (delete 'sanity-check)
(propagated-inputs (list python-h5py
python-nest-asyncio
@ -231,3 +238,70 @@
)
;openmpi-glicid+cuda
;python-seisbench
;
;
;
;
(define-public python-seisbench2
(package
(name "python-seisbench2")
(version "0.4.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/seisbench/seisbench")
(commit (string-append "v" version))))
(file-name (git-file-name "python-seisbench2" version))
(sha256
(base32
; "0jf0s17lrbdcj18wzfbmg37gknay854mfnnmshh4il9xakph1s0g"
"0f0gx1z2fv17qijsvvriv9gfii8rs44pxyg466h76zpdkms0scd2"
))))
(build-system pyproject-build-system)
(arguments
(list
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'fix-build-environment
(lambda _
(delete-file "setup.py")))
(add-before 'build 'pretend-version
;; The version string is usually derived via setuptools-scm, but
;; it doesn't work without the .git directory.
(lambda _
(setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version))
(delete 'check)
(delete 'sanity-check))
)))
(propagated-inputs (list python-h5py
python-nest-asyncio
python-numpy
python-obspy
python-pandas
python-scipy
python-pytorch
python-tqdm))
(native-inputs (list python-black
python-flake8
python-isort
python-pre-commit
python-pytest
python-pytest-asyncio))
(home-page "https://github.com/aertslab/ctxcore")
(synopsis "Core functions for pycisTarget and the SCENIC tool suite")
(description
"ctxcore is part of the SCENIC suite of tools. It provides core functions for
pycisTarget and SCENIC.")
(license license:gpl3+)))
python-seisbench2

View file

@ -14,4 +14,4 @@
(package
(inherit opensycl)
(name "opensycl+cuda")
(inputs (modify-inputs (package-inputs opensycl) (append "cuda-toolkit")))))
(inputs (modify-inputs (package-inputs opensycl) (append cuda)))))