diff options
| author | Danny Milosavljevic <dannym@friendly-machines.com> | 2025-12-22 15:28:58 +0100 |
|---|---|---|
| committer | Danny Milosavljevic <dannym@friendly-machines.com> | 2026-02-12 18:58:10 +0100 |
| commit | b6523e1a20034306ff1413f653923a954a3e8075 (patch) | |
| tree | f1dcd8251640cd8c81458cf002d3dfbec97aa6d2 /gnu/packages/python-science.scm | |
| parent | daaae8ed29282184a0c3164ec8fbe6533c4741d6 (diff) | |
gnu: Add python-pystog.
* gnu/packages/python-science.scm (python-pystog): New variable.
Change-Id: I75eb64488c6a190aebee221bb7387dde2c0797c7
Diffstat (limited to 'gnu/packages/python-science.scm')
| -rw-r--r-- | gnu/packages/python-science.scm | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index b6858c4f2dc..7e11f4b3545 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm | |||
| @@ -6638,6 +6638,55 @@ of crystal structures. It automatically detects Bravais lattice types and | |||
| 6638 | generates k-point labels and band paths following crystallographic | 6638 | generates k-point labels and band paths following crystallographic |
| 6639 | conventions.") | 6639 | conventions.") |
| 6640 | (license license:expat))) | 6640 | (license license:expat))) |
| 6641 | |||
| 6642 | (define-public python-pystog | ||
| 6643 | (package | ||
| 6644 | (name "python-pystog") | ||
| 6645 | (version "0.6.1") | ||
| 6646 | (source | ||
| 6647 | (origin | ||
| 6648 | (method git-fetch) | ||
| 6649 | (uri (git-reference | ||
| 6650 | (url "https://github.com/neutrons/pystog") | ||
| 6651 | (commit (string-append "v" version)))) | ||
| 6652 | (file-name (git-file-name name version)) | ||
| 6653 | (sha256 | ||
| 6654 | (base32 "1dwljmyp083v5a189xzdxxsdkazh5bmbm2f2k79jp7lds0y8h9lg")))) | ||
| 6655 | (build-system pyproject-build-system) | ||
| 6656 | (arguments | ||
| 6657 | (list | ||
| 6658 | #:phases | ||
| 6659 | #~(modify-phases %standard-phases | ||
| 6660 | (add-after 'unpack 'fix-version | ||
| 6661 | (lambda _ | ||
| 6662 | ;; versioningit needs git tags; patch pyproject.toml to use | ||
| 6663 | ;; static version and create _version.py directly. | ||
| 6664 | (substitute* "pyproject.toml" | ||
| 6665 | (("dynamic = \\[\"version\"\\]") | ||
| 6666 | (string-append "version = \"" #$version "\"")) | ||
| 6667 | (("source = \"versioningit\"") "") | ||
| 6668 | (("\\[tool\\.hatch\\.build\\.hooks\\.versioningit-onbuild\\]") | ||
| 6669 | "[tool.hatch.build.hooks.versioningit-onbuild] | ||
| 6670 | enable-by-default = false")) | ||
| 6671 | (mkdir-p "src/pystog") | ||
| 6672 | (call-with-output-file "src/pystog/_version.py" | ||
| 6673 | (lambda (port) | ||
| 6674 | (format port "__version__ = \"~a\"~%" #$version)))))))) | ||
| 6675 | (propagated-inputs | ||
| 6676 | (list python-h5py | ||
| 6677 | python-numpy)) | ||
| 6678 | (native-inputs | ||
| 6679 | (list python-hatchling | ||
| 6680 | python-pytest)) | ||
| 6681 | (home-page "https://github.com/neutrons/pystog") | ||
| 6682 | (synopsis "Total scattering function manipulator") | ||
| 6683 | (description | ||
| 6684 | "PyStoG is a Python package for converting between different total | ||
| 6685 | scattering functions used in crystalline and amorphous materials research. | ||
| 6686 | It handles reciprocal-space structure factors and real-space pair distribution | ||
| 6687 | functions, performing Fourier transforms between them and applying filters to | ||
| 6688 | remove spurious artifacts in the data.") | ||
| 6689 | (license license:gpl3+))) | ||
| 6641 | ;;; | 6690 | ;;; |
| 6642 | ;;; Avoid adding new packages to the end of this file. To reduce the chances | 6691 | ;;; Avoid adding new packages to the end of this file. To reduce the chances |
| 6643 | ;;; of a merge conflict, place them above by existing packages with similar | 6692 | ;;; of a merge conflict, place them above by existing packages with similar |
