diff --git a/.gitignore b/.gitignore index 80caacd..5f77af8 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,20 @@ /visidata-1.5.2.tar.gz +/visidata-2.0.1.tar.gz +/visidata-2.1.tar.gz +/visidata-2.1.1.tar.gz +/visidata-2.2.tar.gz +/visidata-2.2.1.tar.gz +/visidata-2.3.tar.gz +/visidata-2.4.tar.gz +/visidata-2.5.tar.gz +/visidata-2.6.tar.gz +/visidata-2.6.1.tar.gz +/visidata-2.8.tar.gz +/visidata-2.10.2.tar.gz +/visidata-2.11.tar.gz +/visidata-2.11.1.tar.gz +/visidata-3.0.2.tar.gz +/visidata-3.1.1.tar.gz +/visidata-3.2.tar.gz +/requirements.txt +/visidata-3.3.tar.gz diff --git a/.packit.yaml b/.packit.yaml new file mode 100644 index 0000000..d11d5ba --- /dev/null +++ b/.packit.yaml @@ -0,0 +1,18 @@ +# See the documentation for more information: +# https://packit.dev/docs/configuration/ +--- +jobs: + - job: pull_from_upstream + trigger: release + dist_git_branches: + rawhide: + fast_forward_merge_into: + - fedora-branched + - job: koji_build + trigger: commit + dist_git_branches: + - fedora-all + - job: bodhi_update + trigger: commit + dist_git_branches: + - fedora-all diff --git a/0001-Merge-pull-request-268-from-QuLogic-nox.patch b/0001-Merge-pull-request-268-from-QuLogic-nox.patch deleted file mode 100644 index 935448b..0000000 --- a/0001-Merge-pull-request-268-from-QuLogic-nox.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 63e8bfe143447db0e665136d9feb085303544b39 Mon Sep 17 00:00:00 2001 -From: Anja Kefala -Date: Wed, 27 Mar 2019 19:13:30 -0400 -Subject: [PATCH 1/2] Merge pull request #268 from QuLogic/nox - -Remove unnecessary executable bits and shebang. - -Signed-off-by: Elliott Sales de Andrade ---- - visidata/colors.py | 2 -- - visidata/man/vd.1 | 0 - visidata/man/vd.inc | 0 - visidata/vdtui.py | 2 -- - 4 files changed, 4 deletions(-) - mode change 100755 => 100644 visidata/man/vd.1 - mode change 100755 => 100644 visidata/man/vd.inc - -diff --git a/visidata/colors.py b/visidata/colors.py -index a2c4bfc..e3e640d 100644 ---- a/visidata/colors.py -+++ b/visidata/colors.py -@@ -1,5 +1,3 @@ --#!/usr/bin/env python3 -- - import curses - from visidata import globalCommand, colors, Sheet, Column, RowColorizer, wrapply - -diff --git a/visidata/vdtui.py b/visidata/vdtui.py -index c2b7278..a64f157 100755 ---- a/visidata/vdtui.py -+++ b/visidata/vdtui.py -@@ -1,5 +1,3 @@ --#!/usr/bin/env python3 --# - # Copyright 2017-2018 Saul Pwanson http://saul.pw/vdtui - # - # Permission is hereby granted, free of charge, to any person obtaining a copy --- -2.20.1 - diff --git a/0001-Remove-extra-copy-of-man-page.patch b/0001-Remove-extra-copy-of-man-page.patch new file mode 100644 index 0000000..7db4b2d --- /dev/null +++ b/0001-Remove-extra-copy-of-man-page.patch @@ -0,0 +1,42 @@ +From 73ab95f8a4eb40140e1904859b135fb2caf6c751 Mon Sep 17 00:00:00 2001 +From: Elliott Sales de Andrade +Date: Wed, 27 Mar 2019 19:13:42 -0400 +Subject: [PATCH 1/2] Remove extra copy of man page + +It's already installed in /usr/share/man/man1. + +Signed-off-by: Elliott Sales de Andrade +--- + setup.py | 2 +- + visidata/help.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/setup.py b/setup.py +index fe07f60a..6e18d0cb 100755 +--- a/setup.py ++++ b/setup.py +@@ -101,7 +101,7 @@ setup( + "all": all_requirements(), + }, + package_data={ +- "visidata.man": ["vd.1", "vd.txt"], ++ "visidata.man": ["vd.txt"], + "visidata.ddw": ["input.ddw", "regex.ddw"], + "visidata": ["guides/*.md"], + "visidata.tests": ["sample.tsv", "benchmark.csv"], +diff --git a/visidata/help.py b/visidata/help.py +index b7d315b4..f27cc5fa 100644 +--- a/visidata/help.py ++++ b/visidata/help.py +@@ -159,7 +159,7 @@ def openManPage(vd): + import os + with SuspendCurses(): + module_path = vd.pkg_resources_files(__name__.split('.')[0]) +- if os.system(' '.join(['man', str(module_path/'man/vd.1')])) != 0: ++ if os.system(' '.join(['man', 'vd.1'])) != 0: + vd.push(TextSheet('man_vd', source=module_path/'man/vd.txt')) + + +-- +2.50.0 + diff --git a/0002-Fix-test-on-Python-3.14.patch b/0002-Fix-test-on-Python-3.14.patch new file mode 100644 index 0000000..d249484 --- /dev/null +++ b/0002-Fix-test-on-Python-3.14.patch @@ -0,0 +1,36 @@ +From 39d2224d455f0b4639aa4e48db27c122372d8274 Mon Sep 17 00:00:00 2001 +From: Elliott Sales de Andrade +Date: Tue, 12 Aug 2025 21:25:58 -0400 +Subject: [PATCH 2/2] Fix test on Python 3.14 + +Note, this is just a hack, and may be fixed differently by upstream: +https://github.com/saulpw/visidata/issues/2773 + +Signed-off-by: Elliott Sales de Andrade +--- + visidata/tests/test_path.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/visidata/tests/test_path.py b/visidata/tests/test_path.py +index 4bc39f83..6319e746 100644 +--- a/visidata/tests/test_path.py ++++ b/visidata/tests/test_path.py +@@ -1,5 +1,5 @@ + import io +-import pytest ++import sys + + from visidata import Path + +@@ -22,7 +22,7 @@ class TestVisidataPath: + assert Path('foo').ext == '' + assert Path('foo').base_stem == 'foo' + assert Path('foo.').ext == '' +- assert Path('foo.').base_stem == 'foo.' ++ assert Path('foo.').base_stem == ('foo.' if sys.version_info < (3, 14) else 'foo') + assert Path('.foo').ext == '' + assert Path('.foo').base_stem == '.foo' + +-- +2.50.0 + diff --git a/0002-Remove-extra-copy-of-man-page.patch b/0002-Remove-extra-copy-of-man-page.patch deleted file mode 100644 index 7a19ca3..0000000 --- a/0002-Remove-extra-copy-of-man-page.patch +++ /dev/null @@ -1,69 +0,0 @@ -From f82e3ca97bb5adf2a8404e7cd7719a71c66edae7 Mon Sep 17 00:00:00 2001 -From: Elliott Sales de Andrade -Date: Wed, 27 Mar 2019 19:13:42 -0400 -Subject: [PATCH 2/2] Remove extra copy of man page. - -It's already installed in /usr/share/man/man1. - -Signed-off-by: Elliott Sales de Andrade ---- - setup.py | 3 +-- - visidata/data.py | 22 ++++++++++++++++++++-- - 2 files changed, 21 insertions(+), 4 deletions(-) - -diff --git a/setup.py b/setup.py -index 09f59d0..5e00fd1 100755 ---- a/setup.py -+++ b/setup.py -@@ -20,8 +20,7 @@ setup(name='visidata', - packages=['visidata', 'visidata.loaders'], - include_package_data=True, - data_files = [('share/man/man1', ['visidata/man/vd.1'])], -- package_data={'visidata': ['man/vd.1'], -- 'visidata': ['commands.tsv']}, -+ package_data={'visidata': ['commands.tsv']}, - license='GPLv3', - classifiers=[ - 'Development Status :: 5 - Production/Stable', -diff --git a/visidata/data.py b/visidata/data.py -index e61897f..b7d1f52 100644 ---- a/visidata/data.py -+++ b/visidata/data.py -@@ -1,4 +1,5 @@ - import itertools -+import os - import random - - from visidata import * -@@ -112,9 +113,26 @@ bindkey('zKEY_F(1)', 'help-commands') - bindkey('zKEY_BACKSPACE', 'help-commands') - - def openManPage(): -- from pkg_resources import resource_filename -+ import site -+ import sys -+ import sysconfig -+ if '__file__' not in globals(): -+ # Just hope this works. -+ manpage = 'vd.1' -+ elif __file__.startswith(sysconfig.get_path('purelib')): -+ # Global install -+ manpage = os.path.join(sys.prefix, 'share/man/man1/vd.1') -+ if not os.path.exists(manpage): -+ # Definitely a package install and compressed, so don't use a path. -+ manpage = 'vd.1' -+ elif __file__.startswith(site.USER_BASE): -+ # User install -+ manpage = os.path.join(site.USER_BASE, 'share/man/man1/vd.1') -+ else: -+ # Using PYTHONPATH or an editable install; look for file nearby -+ manpage = os.path.join(os.path.dirname(__file__), 'man/vd.1') - with SuspendCurses(): -- os.system(' '.join(['man', resource_filename(__name__, 'man/vd.1')])) -+ os.system(' '.join(['man', manpage])) - - def newSheet(ncols): - return Sheet('unnamed', columns=[ColumnItem('', i, width=8) for i in range(ncols)]) --- -2.20.1 - diff --git a/changelog b/changelog new file mode 100644 index 0000000..53663ec --- /dev/null +++ b/changelog @@ -0,0 +1,58 @@ +* Fri Jul 23 2021 Fedora Release Engineering - 2.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Sun Jul 11 2021 Elliott Sales de Andrade - 2.5-1 +- Update to latest version (#1980629) + +* Fri Jun 04 2021 Python Maint - 2.4-2 +- Rebuilt for Python 3.10 + +* Mon Apr 12 2021 Elliott Sales de Andrade - 2.4-1 +- Update to latest version (#1948367) + +* Mon Apr 05 2021 Elliott Sales de Andrade - 2.3-1 +- Update to latest version (#1946138) + +* Mon Feb 08 2021 Elliott Sales de Andrade - 2.2.1-1 +- Update to latest version +- Fixes rhbz#1926052 + +* Sat Feb 06 2021 Elliott Sales de Andrade - 2.2-1 +- Update to latest version +- Fixes rhbz#1922737 + +* Wed Jan 27 2021 Fedora Release Engineering - 2.1.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Jan 11 2021 Elliott Sales de Andrade - 2.1.1-1 +- Update to latest version (#1912222) + +* Sat Dec 12 2020 Elliott Sales de Andrade - 2.1-1 +- Update to latest version (#1904920) + +* Mon Oct 12 2020 Elliott Sales de Andrade - 2.0.1-1 +- Update to latest version (#1887632) + +* Wed Jul 29 2020 Fedora Release Engineering - 1.5.2-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue May 26 2020 Miro Hrončok - 1.5.2-7 +- Rebuilt for Python 3.9 + +* Fri Jan 31 2020 Fedora Release Engineering - 1.5.2-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Oct 03 2019 Miro Hrončok - 1.5.2-5 +- Rebuilt for Python 3.8.0rc1 (#1748018) + +* Mon Aug 19 2019 Miro Hrončok - 1.5.2-4 +- Rebuilt for Python 3.8 + +* Sat Jul 27 2019 Fedora Release Engineering - 1.5.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Wed Mar 27 2019 Elliott Sales de Andrade - 1.5.2-2 +- Fix issues from review + +* Tue Mar 26 2019 Elliott Sales de Andrade - 1.5.2-1 +- Initial package. diff --git a/sources b/sources index 8dce953..eb0c033 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (visidata-1.5.2.tar.gz) = df236bb74909b3d0bbff012d20b01546ca9058038877a12e94fd2274d7b6465e68c0b652e37776e0b693916070c7185a773d54ead291c996bbb32625897bd4df +SHA512 (visidata-3.3.tar.gz) = 262f12c17d18f0e58e6617bde37ba660199c7b3a078d70e774b65318b5f3daac9c85b2f6b4eaa9e232df85d37bad700b42fb764f9234d3eef3eab2e4e829d176 diff --git a/visidata.spec b/visidata.spec index 6e4de5b..3d23b0c 100644 --- a/visidata.spec +++ b/visidata.spec @@ -1,22 +1,27 @@ %global srcname visidata Name: %{srcname} -Version: 1.5.2 -Release: 8%{?dist} -Summary: Curses interface for exploring and arranging tabular data +Version: 3.3 +Release: %autorelease +Summary: Terminal interface for exploring and arranging tabular data -License: GPLv3 +License: GPL-3.0-only URL: https://visidata.org -Source0: %pypi_source -# https://github.com/saulpw/visidata/pull/268 -Patch0001: 0001-Merge-pull-request-268-from-QuLogic-nox.patch -# https://github.com/saulpw/visidata/pull/269 -Patch0002: 0002-Remove-extra-copy-of-man-page.patch +Source0: %pypi_source %{srcname} +# Fedora specific: +Patch: 0001-Remove-extra-copy-of-man-page.patch +# https://github.com/saulpw/visidata/issues/2773 +Patch: 0002-Fix-test-on-Python-3.14.patch BuildArch: noarch +# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval +ExcludeArch: %{ix86} + +BuildRequires: desktop-file-utils BuildRequires: python3-devel BuildRequires: python3dist(setuptools) +BuildRequires: python3dist(pytest) Requires: python3-%{srcname} = %{version}-%{release} @@ -28,10 +33,10 @@ a lightweight utility which can handle millions of rows with ease. %package -n python3-%{srcname} Summary: %{summary} -%{?python_provide:%python_provide python3-%{srcname}} # Optional dependencies Recommends: python3dist(PyYAML) +Recommends: python3dist(datapackage) Recommends: python3dist(dnslib) Recommends: python3dist(dpkt) Recommends: python3dist(fonttools) @@ -39,14 +44,19 @@ Recommends: python3dist(h5py) Recommends: python3dist(lxml) Recommends: python3dist(mapbox-vector-tile) Recommends: python3dist(namestand) +Recommends: python3dist(numpy) Recommends: python3dist(openpyxl) -Recommends: python3dist(pandas) >= 0.19.2 +Recommends: python3dist(pandas) >= 1.5.3 +Recommends: python3dist(pdfminer-six) Recommends: python3dist(psycopg2) Recommends: python3dist(pypng) Recommends: python3dist(pyshp) Recommends: python3dist(requests) Recommends: python3dist(sas7bdat) Recommends: python3dist(savReaderWriter) +Recommends: python3dist(tabulate) +Recommends: python3dist(vobject) +Recommends: python3dist(wcwidth) Recommends: python3dist(xlrd) Recommends: python3dist(xport) @@ -59,53 +69,35 @@ a lightweight utility which can handle millions of rows with ease. %prep %autosetup -n %{srcname}-%{version} -p1 -# Remove bundled egg-info -rm -rf %{srcname}.egg-info - -# Fix executable bits -chmod -x visidata/vdtui.py visidata/man/vd.1 - +%generate_buildrequires +%pyproject_buildrequires %build -%py3_build - +%pyproject_wheel %install -%py3_install +%pyproject_install +%pyproject_save_files %{srcname} +desktop-file-validate %{buildroot}%{_datadir}/applications/%{srcname}.desktop + +%check +mkdir HOME +touch HOME/.visidatarc # Needed for TestCommands.test_baseCommands +export HOME=$PWD/HOME +%{pytest} %files +%{_bindir}/visidata +%{_bindir}/vd2to3.vdx %{_bindir}/vd %{_mandir}/man1/vd.1* +%{_mandir}/man1/visidata.1* +%{_datadir}/applications/%{srcname}.desktop -%files -n python3-%{srcname} +%files -n python3-%{srcname} -f %{pyproject_files} %doc README.md %license LICENSE.gpl3 -%{python3_sitelib}/%{srcname} -%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info - %changelog -* Wed Jul 29 2020 Fedora Release Engineering - 1.5.2-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Tue May 26 2020 Miro Hrončok - 1.5.2-7 -- Rebuilt for Python 3.9 - -* Fri Jan 31 2020 Fedora Release Engineering - 1.5.2-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Thu Oct 03 2019 Miro Hrončok - 1.5.2-5 -- Rebuilt for Python 3.8.0rc1 (#1748018) - -* Mon Aug 19 2019 Miro Hrončok - 1.5.2-4 -- Rebuilt for Python 3.8 - -* Sat Jul 27 2019 Fedora Release Engineering - 1.5.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Wed Mar 27 2019 Elliott Sales de Andrade - 1.5.2-2 -- Fix issues from review - -* Tue Mar 26 2019 Elliott Sales de Andrade - 1.5.2-1 -- Initial package. +%autochangelog