guix_mirror_bot pushed a commit to branch python-team
in repository guix.
commit 4b34fa5292e493effb286647019c10c193376a00
Author: Sharlatan Hellseher <[email protected]>
AuthorDate: Tue Jan 6 11:56:30 2026 +0000
gnu: python-pyreadstat: Update to 1.3.2.
* gnu/packages/statistics.scm (python-pyreadstat): Update to 1.3.2.
[arguments] <test-backend, test-flags>: Move custom 'check phase logic here.
<phases>: Remove 'change-home-dir; add 'pre-check.
[inputs]: Add readstat.
[propagated-inputs]: Add python-narwhals-minimal and python-numpy.
* gnu/packages/patches/python-pyreadstat-link-libiconv.patch: Refresh
patch for 1.3.2.
Change-Id: I478c67cb48574178483b6dfe97b5ed7bf9b4c783
---
.../patches/python-pyreadstat-link-libiconv.patch | 7 ++--
gnu/packages/statistics.scm | 47 ++++++++++++----------
2 files changed, 29 insertions(+), 25 deletions(-)
diff --git a/gnu/packages/patches/python-pyreadstat-link-libiconv.patch
b/gnu/packages/patches/python-pyreadstat-link-libiconv.patch
index 7efd71faeb..f1876a1be4 100644
--- a/gnu/packages/patches/python-pyreadstat-link-libiconv.patch
+++ b/gnu/packages/patches/python-pyreadstat-link-libiconv.patch
@@ -2,11 +2,12 @@ To ensure libiconv can be found by Guix, we need to link the
library.
--- a/setup.py
+++ b/setup.py
-@@ -81,8 +81,7 @@ else:
+@@ -109,9 +109,7 @@ if os.name == 'nt':
+ else:
libraries.extend(["m", "z"])
_platform = sys.platform
- # Mac: iconv needs to be linked statically
-- if _platform.lower().startswith("darwin"):
+- # Mac and ubuntu: iconv needs to be linked statically
+- if _platform.lower().startswith("darwin") or (is_ubuntu() and
is_python_lt_14()):
- libraries.append("iconv")
+ libraries.append("iconv")
diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index 7477224e15..0c64e9c64e 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -3479,42 +3479,45 @@ files, including Rmarkdown files.")
(define-public python-pyreadstat
(package
(name "python-pyreadstat")
- (version "1.2.4")
+ (version "1.3.2")
(source
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/Roche/pyreadstat")
- (commit (string-append "v" version))))
+ (url "https://github.com/Roche/pyreadstat")
+ (commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "0zysrzixvqw2lwwykxqg5yj8a0zyv5s2bmk22x30f4rj2hgvq1pv"))
+ (base32 "01b7zwvfl46sra0kvdvs19ggx150p4x7pkwl73ar2jda315kjfr4"))
(patches (search-patches "python-pyreadstat-link-libiconv.patch"))))
(build-system pyproject-build-system)
(arguments
(list
+ ;; tests: 92 passed
+ #:test-backend #~'custom
+ ;; The source also contains tests/test_version.py which checks the
+ ;; version in __init__.py against the one in setup.py. Since this
+ ;; requires texlive dependencies to run and is also not mentioned in
+ ;; how_to_test.md, this test is skipped.
+ #:test-flags #~(list "tests/test_basic.py")
#:phases
#~(modify-phases %standard-phases
- (add-before 'check 'change-home-dir
+ (add-before 'check 'pre-check
(lambda _
- ;; test_sav_expand and test_sav_write_basic_expanduser need a
- ;; home directory with write permissions.
- (setenv "HOME" "/tmp")))
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- ;; The source also contains tests/test_version.py
- ;; which checks the version in __init__.py against the
- ;; one in setup.py. Since this requires texlive
- ;; dependencies to run and is also not mentioned in
- ;; how_to_test.md, this test is skipped.
- (invoke "python" "tests/test_basic.py")))))))
- (propagated-inputs (list python-pandas))
- (inputs (list libiconv zlib))
- (native-inputs (list python-cython python-setuptools))
+ (setenv "HOME" "/tmp"))))))
+ (native-inputs
+ (list python-cython
+ python-setuptools))
+ (inputs
+ (list libiconv
+ readstat
+ zlib))
+ (propagated-inputs
+ (list python-narwhals-minimal
+ python-pandas
+ python-numpy))
(home-page "https://github.com/Roche/pyreadstat")
- (synopsis
- "Read and write SAS, SPSS and Stata files into/from Pandas DataFrames")
+ (synopsis "Read and write SAS, SPSS and Stata files into/from Pandas
DataFrames")
(description
"This Python package can be used to read and write SAS, SPSS and Stata
files into/from Pandas DataFrames. It is a wrapper around the C library