Files
python-csvkit/python-csvkit.spec

101 lines
3.4 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-csvkit
#
- update to 1.4.0: * feat: :doc:`/scripts/csvpy` adds the options: --no-number- ellipsis, to disable the ellipsis (…) if max precision is exceeded, for example, when using table.print_table() --sniff-limit` --no-inference` * feat: :doc:`/scripts/csvpy` adds the options: * --no-number-ellipsis, to disable the ellipsis (…) if max precision is exceeded, for example, when using table.print_table() * feat: :doc:`/scripts/csvpy` removes the --linenumbers and --zero output options, which had no effect. * feat: :doc:`/scripts/csvpy` removes the --linenumbers and --zero output options, which had no effect. * feat: :doc:`/scripts/in2csv` adds a --reset-dimensions option to recalculate the dimensions of an XLSX file, instead of trusting the file's metadata. csvkit's dependency agate-excel 0.4.0 automatically recalculates the dimensions if the file's metadata expresses dimensions of "A1:A1" (a single cell). * feat: :doc:`/scripts/in2csv` adds a --reset-dimensions option to recalculate the dimensions of an XLSX file, instead of trusting the file's metadata. csvkit's dependency agate-excel 0.4.0 automatically recalculates the dimensions if the file's metadata expresses dimensions of "A1:A1" (a single cell). * fix: :doc:`/scripts/csvlook` only reads up to --max-rows rows instead of the entire file. * fix: :doc:`/scripts/csvlook` only reads up to --max-rows rows instead of the entire file. * fix: :doc:`/scripts/csvpy` supports the existing input options: --locale --blanks --null-value --date-format --datetime-format --skip-lines OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-csvkit?expand=0&rev=42
2024-03-24 17:26:30 +00:00
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define binaries csvclean csvcut csvformat csvgrep csvjoin csvjson csvlook csvpy csvsort csvsql csvstack csvstat in2csv sql2csv
Name: python-csvkit
- update to 1.4.0: * feat: :doc:`/scripts/csvpy` adds the options: --no-number- ellipsis, to disable the ellipsis (…) if max precision is exceeded, for example, when using table.print_table() --sniff-limit` --no-inference` * feat: :doc:`/scripts/csvpy` adds the options: * --no-number-ellipsis, to disable the ellipsis (…) if max precision is exceeded, for example, when using table.print_table() * feat: :doc:`/scripts/csvpy` removes the --linenumbers and --zero output options, which had no effect. * feat: :doc:`/scripts/csvpy` removes the --linenumbers and --zero output options, which had no effect. * feat: :doc:`/scripts/in2csv` adds a --reset-dimensions option to recalculate the dimensions of an XLSX file, instead of trusting the file's metadata. csvkit's dependency agate-excel 0.4.0 automatically recalculates the dimensions if the file's metadata expresses dimensions of "A1:A1" (a single cell). * feat: :doc:`/scripts/in2csv` adds a --reset-dimensions option to recalculate the dimensions of an XLSX file, instead of trusting the file's metadata. csvkit's dependency agate-excel 0.4.0 automatically recalculates the dimensions if the file's metadata expresses dimensions of "A1:A1" (a single cell). * fix: :doc:`/scripts/csvlook` only reads up to --max-rows rows instead of the entire file. * fix: :doc:`/scripts/csvlook` only reads up to --max-rows rows instead of the entire file. * fix: :doc:`/scripts/csvpy` supports the existing input options: --locale --blanks --null-value --date-format --datetime-format --skip-lines OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-csvkit?expand=0&rev=42
2024-03-24 17:26:30 +00:00
Version: 1.4.0
Release: 0
Summary: A library of utilities for working with CSV
License: MIT
URL: https://github.com/wireservice/csvkit
Source0: https://files.pythonhosted.org/packages/source/c/csvkit/csvkit-%{version}.tar.gz
Source1: https://raw.githubusercontent.com/wireservice/csvkit/5f22e664121b13d9ff005a9206873a8f97431dca/examples/testdbf_converted.csv
- update to 1.4.0: * feat: :doc:`/scripts/csvpy` adds the options: --no-number- ellipsis, to disable the ellipsis (…) if max precision is exceeded, for example, when using table.print_table() --sniff-limit` --no-inference` * feat: :doc:`/scripts/csvpy` adds the options: * --no-number-ellipsis, to disable the ellipsis (…) if max precision is exceeded, for example, when using table.print_table() * feat: :doc:`/scripts/csvpy` removes the --linenumbers and --zero output options, which had no effect. * feat: :doc:`/scripts/csvpy` removes the --linenumbers and --zero output options, which had no effect. * feat: :doc:`/scripts/in2csv` adds a --reset-dimensions option to recalculate the dimensions of an XLSX file, instead of trusting the file's metadata. csvkit's dependency agate-excel 0.4.0 automatically recalculates the dimensions if the file's metadata expresses dimensions of "A1:A1" (a single cell). * feat: :doc:`/scripts/in2csv` adds a --reset-dimensions option to recalculate the dimensions of an XLSX file, instead of trusting the file's metadata. csvkit's dependency agate-excel 0.4.0 automatically recalculates the dimensions if the file's metadata expresses dimensions of "A1:A1" (a single cell). * fix: :doc:`/scripts/csvlook` only reads up to --max-rows rows instead of the entire file. * fix: :doc:`/scripts/csvlook` only reads up to --max-rows rows instead of the entire file. * fix: :doc:`/scripts/csvpy` supports the existing input options: --locale --blanks --null-value --date-format --datetime-format --skip-lines OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-csvkit?expand=0&rev=42
2024-03-24 17:26:30 +00:00
BuildRequires: %{python_module agate >= 1.6.3}
BuildRequires: %{python_module agate-dbf >= 0.2.0}
BuildRequires: %{python_module agate-excel >= 0.2.2}
BuildRequires: %{python_module agate-sql >= 0.5.3}
BuildRequires: %{python_module importlib-metadata if %python-base < 3.10}
- Update to 1.3.0: * /scripts/csvformat adds a --skip-header (-E) option to not output a header row. * /scripts/csvlook adds a --max-precision option to set the maximum number of decimal places to display. * /scripts/csvlook adds a --no-number-ellipsis option to disable the ellipsis (…) if --max-precision is exceeded. * /scripts/csvstat supports the --no-inference (-I), --locale (-L), --blanks, --date-format and datetime-format options. * /scripts/csvstat reports a "Non-null values" statistic. * /scripts/csvstat adds a --non-nulls option to only output counts of non-null values. * /scripts/csvstat reports a "Most decimal places" statistic. * /scripts/csvstat adds a --max-precision option to only output the most decimal places. * /scripts/csvstat adds a --json option to output results as JSON text. * /scripts/csvstat adds an --indent option to indent the JSON text when --json is set. * /scripts/in2csv adds a --use-sheet-names option to use the sheet names as file names when --write-sheets is set. * Add a --null-value option to commands with the --blanks option, to convert additional values to NULL. * Reconfigure the encoding of standard input according to the --encoding option, which defaults to utf-8-sig. * Prompt the user if additional input is expected (i.e. if no input file or piped data is provided) in /scripts/csvjoin, /scripts/csvsql and /scripts/csvstack. * No longer errors if a NUL byte occurs in an input file. * Add Python 3.12 support. * /scripts/csvjoin uses the correct columns when performing a --right join. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-csvkit?expand=0&rev=40
2023-12-14 06:03:53 +00:00
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
- Update to 1.3.0: * /scripts/csvformat adds a --skip-header (-E) option to not output a header row. * /scripts/csvlook adds a --max-precision option to set the maximum number of decimal places to display. * /scripts/csvlook adds a --no-number-ellipsis option to disable the ellipsis (…) if --max-precision is exceeded. * /scripts/csvstat supports the --no-inference (-I), --locale (-L), --blanks, --date-format and datetime-format options. * /scripts/csvstat reports a "Non-null values" statistic. * /scripts/csvstat adds a --non-nulls option to only output counts of non-null values. * /scripts/csvstat reports a "Most decimal places" statistic. * /scripts/csvstat adds a --max-precision option to only output the most decimal places. * /scripts/csvstat adds a --json option to output results as JSON text. * /scripts/csvstat adds an --indent option to indent the JSON text when --json is set. * /scripts/in2csv adds a --use-sheet-names option to use the sheet names as file names when --write-sheets is set. * Add a --null-value option to commands with the --blanks option, to convert additional values to NULL. * Reconfigure the encoding of standard input according to the --encoding option, which defaults to utf-8-sig. * Prompt the user if additional input is expected (i.e. if no input file or piped data is provided) in /scripts/csvjoin, /scripts/csvsql and /scripts/csvstack. * No longer errors if a NUL byte occurs in an input file. * Add Python 3.12 support. * /scripts/csvjoin uses the correct columns when performing a --right join. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-csvkit?expand=0&rev=40
2023-12-14 06:03:53 +00:00
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
- Update to 1.3.0: * /scripts/csvformat adds a --skip-header (-E) option to not output a header row. * /scripts/csvlook adds a --max-precision option to set the maximum number of decimal places to display. * /scripts/csvlook adds a --no-number-ellipsis option to disable the ellipsis (…) if --max-precision is exceeded. * /scripts/csvstat supports the --no-inference (-I), --locale (-L), --blanks, --date-format and datetime-format options. * /scripts/csvstat reports a "Non-null values" statistic. * /scripts/csvstat adds a --non-nulls option to only output counts of non-null values. * /scripts/csvstat reports a "Most decimal places" statistic. * /scripts/csvstat adds a --max-precision option to only output the most decimal places. * /scripts/csvstat adds a --json option to output results as JSON text. * /scripts/csvstat adds an --indent option to indent the JSON text when --json is set. * /scripts/in2csv adds a --use-sheet-names option to use the sheet names as file names when --write-sheets is set. * Add a --null-value option to commands with the --blanks option, to convert additional values to NULL. * Reconfigure the encoding of standard input according to the --encoding option, which defaults to utf-8-sig. * Prompt the user if additional input is expected (i.e. if no input file or piped data is provided) in /scripts/csvjoin, /scripts/csvsql and /scripts/csvstack. * No longer errors if a NUL byte occurs in an input file. * Add Python 3.12 support. * /scripts/csvjoin uses the correct columns when performing a --right join. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-csvkit?expand=0&rev=40
2023-12-14 06:03:53 +00:00
Requires: python-SQLAlchemy
- update to 1.4.0: * feat: :doc:`/scripts/csvpy` adds the options: --no-number- ellipsis, to disable the ellipsis (…) if max precision is exceeded, for example, when using table.print_table() --sniff-limit` --no-inference` * feat: :doc:`/scripts/csvpy` adds the options: * --no-number-ellipsis, to disable the ellipsis (…) if max precision is exceeded, for example, when using table.print_table() * feat: :doc:`/scripts/csvpy` removes the --linenumbers and --zero output options, which had no effect. * feat: :doc:`/scripts/csvpy` removes the --linenumbers and --zero output options, which had no effect. * feat: :doc:`/scripts/in2csv` adds a --reset-dimensions option to recalculate the dimensions of an XLSX file, instead of trusting the file's metadata. csvkit's dependency agate-excel 0.4.0 automatically recalculates the dimensions if the file's metadata expresses dimensions of "A1:A1" (a single cell). * feat: :doc:`/scripts/in2csv` adds a --reset-dimensions option to recalculate the dimensions of an XLSX file, instead of trusting the file's metadata. csvkit's dependency agate-excel 0.4.0 automatically recalculates the dimensions if the file's metadata expresses dimensions of "A1:A1" (a single cell). * fix: :doc:`/scripts/csvlook` only reads up to --max-rows rows instead of the entire file. * fix: :doc:`/scripts/csvlook` only reads up to --max-rows rows instead of the entire file. * fix: :doc:`/scripts/csvpy` supports the existing input options: --locale --blanks --null-value --date-format --datetime-format --skip-lines OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-csvkit?expand=0&rev=42
2024-03-24 17:26:30 +00:00
Requires: python-agate >= 1.6.3
Requires: python-agate-dbf >= 0.2.0
Requires: python-agate-excel
Requires: python-agate-sql
- Update to 1.3.0: * /scripts/csvformat adds a --skip-header (-E) option to not output a header row. * /scripts/csvlook adds a --max-precision option to set the maximum number of decimal places to display. * /scripts/csvlook adds a --no-number-ellipsis option to disable the ellipsis (…) if --max-precision is exceeded. * /scripts/csvstat supports the --no-inference (-I), --locale (-L), --blanks, --date-format and datetime-format options. * /scripts/csvstat reports a "Non-null values" statistic. * /scripts/csvstat adds a --non-nulls option to only output counts of non-null values. * /scripts/csvstat reports a "Most decimal places" statistic. * /scripts/csvstat adds a --max-precision option to only output the most decimal places. * /scripts/csvstat adds a --json option to output results as JSON text. * /scripts/csvstat adds an --indent option to indent the JSON text when --json is set. * /scripts/in2csv adds a --use-sheet-names option to use the sheet names as file names when --write-sheets is set. * Add a --null-value option to commands with the --blanks option, to convert additional values to NULL. * Reconfigure the encoding of standard input according to the --encoding option, which defaults to utf-8-sig. * Prompt the user if additional input is expected (i.e. if no input file or piped data is provided) in /scripts/csvjoin, /scripts/csvsql and /scripts/csvstack. * No longer errors if a NUL byte occurs in an input file. * Add Python 3.12 support. * /scripts/csvjoin uses the correct columns when performing a --right join. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-csvkit?expand=0&rev=40
2023-12-14 06:03:53 +00:00
Requires: python-openpyxl
Requires: python-xlrd
%if %python_version_nodots < 310
Requires: python-importlib-metadata
%endif
Requires(post): update-alternatives
- update to 1.4.0: * feat: :doc:`/scripts/csvpy` adds the options: --no-number- ellipsis, to disable the ellipsis (…) if max precision is exceeded, for example, when using table.print_table() --sniff-limit` --no-inference` * feat: :doc:`/scripts/csvpy` adds the options: * --no-number-ellipsis, to disable the ellipsis (…) if max precision is exceeded, for example, when using table.print_table() * feat: :doc:`/scripts/csvpy` removes the --linenumbers and --zero output options, which had no effect. * feat: :doc:`/scripts/csvpy` removes the --linenumbers and --zero output options, which had no effect. * feat: :doc:`/scripts/in2csv` adds a --reset-dimensions option to recalculate the dimensions of an XLSX file, instead of trusting the file's metadata. csvkit's dependency agate-excel 0.4.0 automatically recalculates the dimensions if the file's metadata expresses dimensions of "A1:A1" (a single cell). * feat: :doc:`/scripts/in2csv` adds a --reset-dimensions option to recalculate the dimensions of an XLSX file, instead of trusting the file's metadata. csvkit's dependency agate-excel 0.4.0 automatically recalculates the dimensions if the file's metadata expresses dimensions of "A1:A1" (a single cell). * fix: :doc:`/scripts/csvlook` only reads up to --max-rows rows instead of the entire file. * fix: :doc:`/scripts/csvlook` only reads up to --max-rows rows instead of the entire file. * fix: :doc:`/scripts/csvpy` supports the existing input options: --locale --blanks --null-value --date-format --datetime-format --skip-lines OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-csvkit?expand=0&rev=42
2024-03-24 17:26:30 +00:00
Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages
%description
CSVkit is a library of utilities for working with CSV. It is inspired
by pdftk, gdal and the original csvcut utility by Joe Germuska and
Aaron Bycoffe.
%prep
%setup -q -n csvkit-%{version}
# find and remove unneeded shebangs
find csvkit -name "*.py" | xargs sed -i '1 {/^#!/ d}'
# agate-dbf >= 0.2.2 creates uppercase fieldnames for this example file -- gh#wireservice/csvkit#1073
%if %{pkg_vcmp python3-agate-dbf >= 0.2.2}
cp %{SOURCE1} examples/testdbf_converted.csv
%endif
%build
- Update to 1.3.0: * /scripts/csvformat adds a --skip-header (-E) option to not output a header row. * /scripts/csvlook adds a --max-precision option to set the maximum number of decimal places to display. * /scripts/csvlook adds a --no-number-ellipsis option to disable the ellipsis (…) if --max-precision is exceeded. * /scripts/csvstat supports the --no-inference (-I), --locale (-L), --blanks, --date-format and datetime-format options. * /scripts/csvstat reports a "Non-null values" statistic. * /scripts/csvstat adds a --non-nulls option to only output counts of non-null values. * /scripts/csvstat reports a "Most decimal places" statistic. * /scripts/csvstat adds a --max-precision option to only output the most decimal places. * /scripts/csvstat adds a --json option to output results as JSON text. * /scripts/csvstat adds an --indent option to indent the JSON text when --json is set. * /scripts/in2csv adds a --use-sheet-names option to use the sheet names as file names when --write-sheets is set. * Add a --null-value option to commands with the --blanks option, to convert additional values to NULL. * Reconfigure the encoding of standard input according to the --encoding option, which defaults to utf-8-sig. * Prompt the user if additional input is expected (i.e. if no input file or piped data is provided) in /scripts/csvjoin, /scripts/csvsql and /scripts/csvstack. * No longer errors if a NUL byte occurs in an input file. * Add Python 3.12 support. * /scripts/csvjoin uses the correct columns when performing a --right join. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-csvkit?expand=0&rev=40
2023-12-14 06:03:53 +00:00
%pyproject_wheel
%install
- Update to 1.3.0: * /scripts/csvformat adds a --skip-header (-E) option to not output a header row. * /scripts/csvlook adds a --max-precision option to set the maximum number of decimal places to display. * /scripts/csvlook adds a --no-number-ellipsis option to disable the ellipsis (…) if --max-precision is exceeded. * /scripts/csvstat supports the --no-inference (-I), --locale (-L), --blanks, --date-format and datetime-format options. * /scripts/csvstat reports a "Non-null values" statistic. * /scripts/csvstat adds a --non-nulls option to only output counts of non-null values. * /scripts/csvstat reports a "Most decimal places" statistic. * /scripts/csvstat adds a --max-precision option to only output the most decimal places. * /scripts/csvstat adds a --json option to output results as JSON text. * /scripts/csvstat adds an --indent option to indent the JSON text when --json is set. * /scripts/in2csv adds a --use-sheet-names option to use the sheet names as file names when --write-sheets is set. * Add a --null-value option to commands with the --blanks option, to convert additional values to NULL. * Reconfigure the encoding of standard input according to the --encoding option, which defaults to utf-8-sig. * Prompt the user if additional input is expected (i.e. if no input file or piped data is provided) in /scripts/csvjoin, /scripts/csvsql and /scripts/csvstack. * No longer errors if a NUL byte occurs in an input file. * Add Python 3.12 support. * /scripts/csvjoin uses the correct columns when performing a --right join. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-csvkit?expand=0&rev=40
2023-12-14 06:03:53 +00:00
%pyproject_install
for b in %{binaries}; do
%python_clone -a %{buildroot}%{_bindir}/$b
done
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
export LANG=en_US.UTF-8
%pyunittest discover -s tests/ -v
%post
%{lua:for b in rpm.expand("%{binaries}"):gmatch("%S+") do
print(rpm.expand("%python_install_alternative " .. b .. "\n"))
end}
%postun
%{lua:for b in rpm.expand("%{binaries}"):gmatch("%S+") do
print(rpm.expand("%python_uninstall_alternative " .. b .. "\n"))
end}
%files %{python_files}
%license COPYING
%doc AUTHORS.rst CHANGELOG.rst README.rst
%{lua:for b in rpm.expand("%{binaries}"):gmatch("%S+") do
print(rpm.expand("%python_alternative %{_bindir}/" .. b .. "\n"))
end}
- Update to 1.3.0: * /scripts/csvformat adds a --skip-header (-E) option to not output a header row. * /scripts/csvlook adds a --max-precision option to set the maximum number of decimal places to display. * /scripts/csvlook adds a --no-number-ellipsis option to disable the ellipsis (…) if --max-precision is exceeded. * /scripts/csvstat supports the --no-inference (-I), --locale (-L), --blanks, --date-format and datetime-format options. * /scripts/csvstat reports a "Non-null values" statistic. * /scripts/csvstat adds a --non-nulls option to only output counts of non-null values. * /scripts/csvstat reports a "Most decimal places" statistic. * /scripts/csvstat adds a --max-precision option to only output the most decimal places. * /scripts/csvstat adds a --json option to output results as JSON text. * /scripts/csvstat adds an --indent option to indent the JSON text when --json is set. * /scripts/in2csv adds a --use-sheet-names option to use the sheet names as file names when --write-sheets is set. * Add a --null-value option to commands with the --blanks option, to convert additional values to NULL. * Reconfigure the encoding of standard input according to the --encoding option, which defaults to utf-8-sig. * Prompt the user if additional input is expected (i.e. if no input file or piped data is provided) in /scripts/csvjoin, /scripts/csvsql and /scripts/csvstack. * No longer errors if a NUL byte occurs in an input file. * Add Python 3.12 support. * /scripts/csvjoin uses the correct columns when performing a --right join. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-csvkit?expand=0&rev=40
2023-12-14 06:03:53 +00:00
%{python_sitelib}/csvkit-%{version}.dist-info
%{python_sitelib}/csvkit/
%changelog