public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-trx-python] rawhide: Update to 0.4.0 (close RHBZ#2445051)
@ 2026-07-12 9:58 Benjamin A. Beasley
0 siblings, 0 replies; only message in thread
From: Benjamin A. Beasley @ 2026-07-12 9:58 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-trx-python
Branch : rawhide
Commit : 00c0bb03a20e414723d1e663bd6ba64ca5438fc5
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date : 2026-07-12T10:37:23+01:00
Stats : +51/-113 in 4 file(s)
URL : https://src.fedoraproject.org/rpms/python-trx-python/c/00c0bb03a20e414723d1e663bd6ba64ca5438fc5?branch=rawhide
Log:
Update to 0.4.0 (close RHBZ#2445051)
- Drop man pages (--help output not suitable for help2man)
---
diff --git a/.gitignore b/.gitignore
index af3e5f5..c6b0af0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@
/memmap_test_data.zip
/trx_from_scratch.zip
/trx-python-0.3.tar.gz
+/trx-python-0.4.0.tar.gz
diff --git a/75.patch b/75.patch
deleted file mode 100644
index dd46420..0000000
--- a/75.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 81c3efde71359f6fade75f53864fc2174f5f327a Mon Sep 17 00:00:00 2001
-From: Ariel Rokem <arokem@gmail.com>
-Date: Wed, 20 Dec 2023 07:24:58 -0800
-Subject: [PATCH] Move setuptools_scm to be a setup requirement, instead of
- installation.
-
-Closes #73.
----
- setup.cfg | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/setup.cfg b/setup.cfg
-index 3622ae7..42cd474 100644
---- a/setup.cfg
-+++ b/setup.cfg
-@@ -25,8 +25,8 @@ python_requires = >=3.8
- setup_requires =
- packaging >= 19.0
- cython >= 0.29
--install_requires =
- setuptools_scm
-+install_requires =
- deepdiff
- nibabel >= 5
- numpy >= 1.22
diff --git a/python-trx-python.spec b/python-trx-python.spec
index 5821df6..2172575 100644
--- a/python-trx-python.spec
+++ b/python-trx-python.spec
@@ -1,47 +1,31 @@
-%global pypi_name trx-python
-
-Name: python-%{pypi_name}
-Version: 0.3
+Name: python-trx-python
+Version: 0.4.0
Release: %{autorelease}
-Summary: Experiments with new file format for tractography
-
-%global forgeurl https://github.com/tee-ar-ex/trx-python
-%global tag %{version}
-%forgemeta
+Summary: Community-oriented file format for tractography
-# Test datasets (additional source files) are licensed CC-BY-4.0
License: BSD-2-Clause
-URL: %forgeurl
-Source0: %forgesource
-# Test files
-# Test suite tries to download them, but will only do a checksum check
-# if they already exist.
-# Source URLs and file version and their md5sum are listed in
-# https://github.com/tee-ar-ex/trx-python/blob/master/trx/fetcher.py
-#
+# Test datasets (additional source files) are licensed CC-BY-4.0
+SourceLicense: %{license} AND CC-BY-4.0
+URL: https://github.com/tee-ar-ex/trx-python
+Source0: %{url}/archive/%{version}/trx-python-%{version}.tar.gz
+# Test files defined in trx/fetcher.py
+# All are (per their respective entries on figshare.com) CC-BY-4.0
+%global test_data_repo tee-ar-ex/trx-test-data
+%global test_data_tag v0.1.0
+%global test_data_base_url https://github.com/%{test_data_repo}/releases/download/%{test_data_tag}
# https://figshare.com/articles/dataset/DSI/20001554/1?file=37624154
-# CC-BY-4.0
-Source1: https://figshare.com/ndownloader/files/37624154#/DSI.zip
+Source1: %{test_data_base_url}/DSI.zip
# https://figshare.com/articles/dataset/memmap_test_data_zip/20020460
-# CC-BY-4.0
-Source2: https://figshare.com/ndownloader/files/37624148#/memmap_test_data.zip
+Source2: %{test_data_base_url}/memmap_test_data.zip
# https://figshare.com/articles/dataset/trx_from_scratch_zip/20020412
-# CC-BY-4.0
-Source3: https://figshare.com/ndownloader/files/37624151#/trx_from_scratch.zip
+Source3: %{test_data_base_url}/trx_from_scratch.zip
# https://figshare.com/articles/dataset/gold_standard_zip/21520557
-# CC-BY-4.0
-Source4: https://figshare.com/ndownloader/files/38146098#/gold_standard.zip
-# Fix setuptools_scm listed as install requirement
-# https://github.com/tee-ar-ex/trx-python/pull/75
-Patch: %{forgeurl}/pull/75.patch
+Source4: %{test_data_base_url}/gold_standard.zip
BuildArch: noarch
-BuildRequires: python3-devel
-# For tests
-BuildRequires: %{py3_dist pytest}
-BuildRequires: %{py3_dist psutil}
-# For man pages
-BuildRequires: help2man
+
+# This would enable more tests, but it was orphaned and retired.
+# BuildRequires: %%{py3_dist dipy}
%global _description %{expand:
This is a Python implementation of the trx file-format for tractography
@@ -53,78 +37,56 @@ https://tee-ar-ex.github.io/trx-python/.}
%description %_description
-%package -n python3-%{pypi_name}
+%package -n python3-trx-python
Summary: %{summary}
-%description -n python3-%{pypi_name} %_description
+%description -n python3-trx-python %_description
%prep
-%forgeautosetup -p1
-
-# Install test files
-install -p -m 644 -D -t tests %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4}
+%autosetup -C -p1
-# Remove .py extension from executables
-for SCRIPT in $(ls scripts/tff_*.py); do
- mv ${SCRIPT} ${SCRIPT//.py/}
-done
-# Fix glob in setup.py
-sed -r -i 's|(scripts/)\*\.py|\1tff_*|' setup.py
+# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters
+%pyproject_patch_dependency pytest-cov:ignore
%generate_buildrequires
-export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
-%pyproject_buildrequires
+export SETUPTOOLS_SCM_PRETEND_VERSION='%{version}'
+%pyproject_buildrequires --extras test
%build
-export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
+export SETUPTOOLS_SCM_PRETEND_VERSION='%{version}'
%pyproject_wheel
%install
%pyproject_install
-%pyproject_save_files -l trx
-
-# Don't ship the tests
-rm -rf %{buildroot}%{python3_sitelib}/trx/tests
-sed -i '/tests/d' %{pyproject_files}
-
-# Create man pages from --help and --version
-mkdir man
-mkdir -p %{buildroot}%{_mandir}/man1
-for BIN in $(ls scripts/tff_*); do
- echo "Generating man page for ${BIN//*\//}"
- %{py3_test_envvars} help2man --section 1 --no-discard-stderr \
- --no-info --output man/${BIN//*\//}.1 ${BIN//*\//}
- install -m 0644 man/${BIN//*\//}.1 %{buildroot}%{_mandir}/man1
-done
+%pyproject_save_files --assert-license trx
%check
-# Tests require network for downloading test data. We can provide those
-# without downloading. Use get_test_files.sh for updating if needed.
-# Set directory for test files
-export TRX_HOME="${PWD}/tests"
-# Exlcude tests that fail consistently on big endian.
-# https://github.com/tee-ar-ex/trx-python/issues/83
-%if "%{_host_cpu}" == "s390x"
-k="${k-}${k+ and }not test_seq_ops_trx"
-k="${k-}${k+ and }not test_concatenate[small.trx]"
-k="${k-}${k+ and }not test_resize[small.trx]"
-k="${k-}${k+ and }not test_append[small.trx-10000]"
-k="${k-}${k+ and }not test_append_Tractogram[small.trx-10000]"
-%endif
-# scripts/tests is for internal testing (GitHub workflow)
-%pytest -v --ignore=scripts/tests ${k+-k "$k"}
-%pyproject_check_import -e trx.tests*
-
-
-%files -n python3-%{pypi_name} -f %{pyproject_files}
-%doc README.*
-%{_bindir}/tff_*
-%{_mandir}/man1/tff_*.1*
+%pyproject_check_import
+
+export TRX_HOME="${PWD}/_home"
+mkdir --parents "${TRX_HOME}"
+ln '%{SOURCE1}' '%{SOURCE2}' '%{SOURCE3}' '%{SOURCE4}' "${TRX_HOME}"
+%pytest -rs --verbose
+
+
+%files -n python3-trx-python -f %{pyproject_files}
+%doc README.md
+%{_bindir}/trx
+%{_bindir}/trx_concatenate_tractograms
+%{_bindir}/trx_convert_dsi_studio
+%{_bindir}/trx_convert_tractogram
+%{_bindir}/trx_generate_from_scratch
+%{_bindir}/trx_info
+%{_bindir}/trx_manipulate_datatype
+%{_bindir}/trx_simple_compare
+%{_bindir}/trx_validate
+%{_bindir}/trx_verify_header_compatibility
+%{_bindir}/trx_visualize_overlap
%changelog
diff --git a/sources b/sources
index 03c0ec5..cc664b8 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
-SHA512 (trx-python-0.3.tar.gz) = 728c3dc07379b470829634a4461ec9525503e67eed82f9f9ad3e91d2a563de1fdd2b17ea9218e8eeda5858dde04ceaf5e9ef46bc60edd8d48d60cf14ae16321e
+SHA512 (trx-python-0.4.0.tar.gz) = 5da1234c8afc81263d5aa93513e4918e192716040b963a55b5103ae654eb20986f89f100ee02da94e03d9d8a218b8103006a258f5c88e522b88ae45af09ac9f9
SHA512 (DSI.zip) = 1840690cbd2d14b04a0e2f052c30b07c31b9bdd8e3c0eeeb2a99de256dc4e0f976565b2195a2b9b08f0b33d72c837499a794b2acbf7f22652a7cf1c9817cfddf
SHA512 (memmap_test_data.zip) = b67c8695b59e9c97589c3dafc5ef077ce3813a08fa9f52ed510ddfdcb02b399352b0e3d3ced92f14434c7224fe85a06feeea53c1230e16f578a5262fcaff5d84
SHA512 (trx_from_scratch.zip) = bf5ee26defad73003f689296c27ff31f04169e6044de85ab6588b20c5d110a302fa07b7d0b3b69221878d43ff776a8a45735b7d968ce050fd8e0a978f55a39df
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-12 9:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-12 9:58 [rpms/python-trx-python] rawhide: Update to 0.4.0 (close RHBZ#2445051) Benjamin A. Beasley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox