diff --git a/gnu/packages/physics.scm b/gnu/packages/physics.scm index 8f5e7f7b3d..911b8ba3f9 100644 --- a/gnu/packages/physics.scm +++ b/gnu/packages/physics.scm @@ -144,3 +144,52 @@ Information File) format files. CIF is the standard format for crystallographic data exchange endorsed by the International Union of Crystallography.") (license license:psfl))) + +(define-public python-pystog + (package + (name "python-pystog") + (version "0.6.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/neutrons/pystog") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1dwljmyp083v5a189xzdxxsdkazh5bmbm2f2k79jp7lds0y8h9lg")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-version + (lambda _ + ;; versioningit needs git tags; patch pyproject.toml to use + ;; static version and create _version.py directly. + (substitute* "pyproject.toml" + (("dynamic = \\[\"version\"\\]") + (string-append "version = \"" #$version "\"")) + (("source = \"versioningit\"") "") + (("\\[tool\\.hatch\\.build\\.hooks\\.versioningit-onbuild\\]") + "[tool.hatch.build.hooks.versioningit-onbuild] +enable-by-default = false")) + (mkdir-p "src/pystog") + (call-with-output-file "src/pystog/_version.py" + (lambda (port) + (format port "__version__ = \"~a\"~%" #$version)))))))) + (propagated-inputs + (list python-h5py + python-numpy)) + (native-inputs + (list python-hatchling + python-pytest)) + (home-page "https://github.com/neutrons/pystog") + (synopsis "Total scattering function manipulator") + (description + "PyStoG is a Python package for converting between different total +scattering functions used in crystalline and amorphous materials research. +It handles reciprocal-space structure factors and real-space pair distribution +functions, performing Fourier transforms between them and applying filters to +remove spurious artifacts in the data.") + (license license:gpl3+))) diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index aa262a79de..86748526f3 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -6562,55 +6562,6 @@ generates k-point labels and band paths following crystallographic conventions.") (license license:expat))) -(define-public python-pystog - (package - (name "python-pystog") - (version "0.6.1") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/neutrons/pystog") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 "1dwljmyp083v5a189xzdxxsdkazh5bmbm2f2k79jp7lds0y8h9lg")))) - (build-system pyproject-build-system) - (arguments - (list - #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'fix-version - (lambda _ - ;; versioningit needs git tags; patch pyproject.toml to use - ;; static version and create _version.py directly. - (substitute* "pyproject.toml" - (("dynamic = \\[\"version\"\\]") - (string-append "version = \"" #$version "\"")) - (("source = \"versioningit\"") "") - (("\\[tool\\.hatch\\.build\\.hooks\\.versioningit-onbuild\\]") - "[tool.hatch.build.hooks.versioningit-onbuild] -enable-by-default = false")) - (mkdir-p "src/pystog") - (call-with-output-file "src/pystog/_version.py" - (lambda (port) - (format port "__version__ = \"~a\"~%" #$version)))))))) - (propagated-inputs - (list python-h5py - python-numpy)) - (native-inputs - (list python-hatchling - python-pytest)) - (home-page "https://github.com/neutrons/pystog") - (synopsis "Total scattering function manipulator") - (description - "PyStoG is a Python package for converting between different total -scattering functions used in crystalline and amorphous materials research. -It handles reciprocal-space structure factors and real-space pair distribution -functions, performing Fourier transforms between them and applying filters to -remove spurious artifacts in the data.") - (license license:gpl3+))) - (define-public python-orsopy (package (name "python-orsopy")