[Bug 2279794] Review Request: python-columnar - A tool for printing data in a columnar format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=2279794



--- Comment #4 from Benson Muite <benson_muite@xxxxxxxxxxxxx> ---
It will not currently build.  It appears that the only source is what is
on PyPI.  To get it to build, consider modifying the spec file.

Change
Source0:       
https://files.pythonhosted.org/packages/source/c/%{pypi_name}/Columnar-%{pypi_version}.tar.gz
to
Source0:        %{pypi_source Columnar}

Remove
BuildRequires:  python3dist(setuptools)


Remove
Requires:       python3dist(toolz)
Requires:       python3dist(wcwidth)

see

Change
%pyproject_buildrequires -t
to
%pyproject_buildrequires
there are no test dependencies

Change
%pyproject_install
to
%pyproject_install
%pyproject_save_files columnar


%check
%pyproject_check_import


Change
%files -n python3-%{pypi_name}
%doc README.md
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/Columnar-%{pypi_version}.dist-info/
to

%files -n python3-%{pypi_name}  -f %{pyproject_files}
%doc README.md

For a smoke test you might use code from https://pypi.org/project/columnar/ to
generate something like

cat <<EOF> testfile.py
from columnar import columnar

headers = ['name', 'id', 'host', 'notes']

data = [
    ['busybox', 'c3c37d5d-38d2-409f-8d02-600fd9d51239', 'linuxnode-1-292735',
'Test server.'],
    ['alpine-python', '6bb77855-0fda-45a9-b553-e19e1a795f1e',
'linuxnode-2-249253', 'The one that runs python.'],
    ['redis', 'afb648ba-ac97-4fb2-8953-9a5b5f39663e', 'linuxnode-3-3416918',
'For queues and stuff.'],
    ['app-server', 'b866cd0f-bf80-40c7-84e3-c40891ec68f9',
'linuxnode-4-295918', 'A popular destination.'],
    ['nginx', '76fea0f0-aa53-4911-b7e4-fae28c2e469b', 'linuxnode-5-292735',
'Traffic Cop'],
]

table = columnar(data, headers, no_borders=True)
print(table)
EOF

Then in the %check section add
%py3_test_envvars %python3 testfile.py


-- 
You are receiving this mail because:
You are always notified about changes to this product and component
You are on the CC list for the bug.
https://bugzilla.redhat.com/show_bug.cgi?id=2279794

Report this comment as SPAM: https://bugzilla.redhat.com/enter_bug.cgi?product=Bugzilla&format=report-spam&short_desc=Report%20of%20Bug%202279794%23c4

-- 
_______________________________________________
package-review mailing list -- package-review@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to package-review-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/package-review@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite Conditions]     [KDE Users]

  Powered by Linux