diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-04-10 08:55:46 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-04-10 08:55:46 +0000 |
| commit | 550370413f238b01d5d7d27058e74984063801c2 (patch) | |
| tree | 5e1061a3559d3a1463b959c4de68f10f611496c4 | |
| parent | f6bcd13d73c4cd6fb708d1239d1e9eedb42fbfb8 (diff) | |
automatic import of python-texttable
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | python-texttable.spec | 582 | ||||
| -rw-r--r-- | sources | 1 |
3 files changed, 584 insertions, 0 deletions
@@ -0,0 +1 @@ +/texttable-1.6.7.tar.gz diff --git a/python-texttable.spec b/python-texttable.spec new file mode 100644 index 0000000..24913c2 --- /dev/null +++ b/python-texttable.spec @@ -0,0 +1,582 @@ +%global _empty_manifest_terminate_build 0 +Name: python-texttable +Version: 1.6.7 +Release: 1 +Summary: module to create simple ASCII tables +License: MIT +URL: https://github.com/foutaise/texttable/ +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/e4/84/4686ee611bb020038375c5f11fe7b6b3bb94ee78614a1faba45effe51591/texttable-1.6.7.tar.gz +BuildArch: noarch + + +%description + abcd 67.000 6.540e+02 89 128.001 + efghijk 67.543 6.540e-01 90 1.280e+22 + lmn 0.000 5.000e-78 89 0.000 + opqrstu 0.023 5.000e+78 92 1.280e+22 +CLASSES + class Texttable + | Methods defined here: + | + | __init__(self, max_width=80) + | Constructor + | + | - max_width is an integer, specifying the maximum width of the table + | - if set to 0, size is unlimited, therefore cells won't be wrapped + | + | add_row(self, array) + | Add a row in the rows stack + | + | - cells can contain newlines and tabs + | + | add_rows(self, rows, header=True) + | Add several rows in the rows stack + | + | - The 'rows' argument can be either an iterator returning arrays, + | or a by-dimensional array + | - 'header' specifies if the first row should be used as the header + | of the table + | + | draw(self) + | Draw the table + | + | - the table is returned as a whole string + | + | header(self, array) + | Specify the header of the table + | + | reset(self) + | Reset the instance + | + | - reset rows and header + | + | set_chars(self, array) + | Set the characters used to draw lines between rows and columns + | + | - the array should contain 4 fields: + | + | [horizontal, vertical, corner, header] + | + | - default is set to: + | + | ['-', '|', '+', '='] + | + | set_cols_align(self, array) + | Set the desired columns alignment + | + | - the elements of the array should be either "l", "c" or "r": + | + | * "l": column flushed left + | * "c": column centered + | * "r": column flushed right + | + | set_cols_dtype(self, array) + | Set the desired columns datatype for the cols. + | + | - the elements of the array should be either a callable or any of + | "a", "t", "f", "e" or "i": + | + | * "a": automatic (try to use the most appropriate datatype) + | * "t": treat as text + | * "f": treat as float in decimal format + | * "e": treat as float in exponential format + | * "i": treat as int + | * a callable: should return formatted string for any value given + | + | - by default, automatic datatyping is used for each column + | + | set_cols_valign(self, array) + | Set the desired columns vertical alignment + | + | - the elements of the array should be either "t", "m" or "b": + | + | * "t": column aligned on the top of the cell + | * "m": column aligned on the middle of the cell + | * "b": column aligned on the bottom of the cell + | + | set_cols_width(self, array) + | Set the desired columns width + | + | - the elements of the array should be integers, specifying the + | width of each column. For example: + | + | [10, 20, 5] + | + | set_deco(self, deco) + | Set the table decoration + | + | - 'deco' can be a combination of: + | + | Texttable.BORDER: Border around the table + | Texttable.HEADER: Horizontal line below the header + | Texttable.HLINES: Horizontal lines between rows + | Texttable.VLINES: Vertical lines between columns + | + | All of them are enabled by default + | + | - example: + | + | Texttable.BORDER | Texttable.HEADER + | + | set_header_align(self, array) + | Set the desired header alignment + | + | - the elements of the array should be either "l", "c" or "r": + | + | * "l": column flushed left + | * "c": column centered + | * "r": column flushed right + | + | set_max_width(self, max_width) + | Set the maximum width of the table + | + | - max_width is an integer, specifying the maximum width of the table + | - if set to 0, size is unlimited, therefore cells won't be wrapped + | + | set_precision(self, width) + | Set the desired precision for float/exponential formats + | + | - width must be an integer >= 0 + | + | - default value is set to 3 + | + | ---------------------------------------------------------------------- + | Data and other attributes defined here: + | + | BORDER = 1 + | + | HEADER = 2 + | + | HLINES = 4 + | + | VLINES = 8 +DATA + __all__ = ['Texttable', 'ArraySizeError'] + __author__ = 'Gerome Fournier <jef(at)foutaise.org>' + __credits__ = 'Jeff Kowalczyk:\n - textwrap improved import\n ...at... + __license__ = 'MIT' + __version__ = '1.6.7' +VERSION + 1.6.7 +AUTHOR + Gerome Fournier <jef(at)foutaise.org> +CREDITS + Jeff Kowalczyk: + - textwrap improved import + - comment concerning header output + Anonymous: + - add_rows method, for adding rows in one go + Sergey Simonenko: + - redefined len() function to deal with non-ASCII characters + Roger Lew: + - columns datatype specifications + Brian Peterson: + - better handling of unicode errors + Frank Sachsenheim: + - add Python 2/3-compatibility + Maximilian Hils: + - fix minor bug for Python 3 compatibility + frinkelpi: + - preserve empty lines +``` +## Forks +* [latextable](https://github.com/JAEarly/latextable) is a fork of texttable that provide a LaTeX backend. + +%package -n python3-texttable +Summary: module to create simple ASCII tables +Provides: python-texttable +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-texttable + abcd 67.000 6.540e+02 89 128.001 + efghijk 67.543 6.540e-01 90 1.280e+22 + lmn 0.000 5.000e-78 89 0.000 + opqrstu 0.023 5.000e+78 92 1.280e+22 +CLASSES + class Texttable + | Methods defined here: + | + | __init__(self, max_width=80) + | Constructor + | + | - max_width is an integer, specifying the maximum width of the table + | - if set to 0, size is unlimited, therefore cells won't be wrapped + | + | add_row(self, array) + | Add a row in the rows stack + | + | - cells can contain newlines and tabs + | + | add_rows(self, rows, header=True) + | Add several rows in the rows stack + | + | - The 'rows' argument can be either an iterator returning arrays, + | or a by-dimensional array + | - 'header' specifies if the first row should be used as the header + | of the table + | + | draw(self) + | Draw the table + | + | - the table is returned as a whole string + | + | header(self, array) + | Specify the header of the table + | + | reset(self) + | Reset the instance + | + | - reset rows and header + | + | set_chars(self, array) + | Set the characters used to draw lines between rows and columns + | + | - the array should contain 4 fields: + | + | [horizontal, vertical, corner, header] + | + | - default is set to: + | + | ['-', '|', '+', '='] + | + | set_cols_align(self, array) + | Set the desired columns alignment + | + | - the elements of the array should be either "l", "c" or "r": + | + | * "l": column flushed left + | * "c": column centered + | * "r": column flushed right + | + | set_cols_dtype(self, array) + | Set the desired columns datatype for the cols. + | + | - the elements of the array should be either a callable or any of + | "a", "t", "f", "e" or "i": + | + | * "a": automatic (try to use the most appropriate datatype) + | * "t": treat as text + | * "f": treat as float in decimal format + | * "e": treat as float in exponential format + | * "i": treat as int + | * a callable: should return formatted string for any value given + | + | - by default, automatic datatyping is used for each column + | + | set_cols_valign(self, array) + | Set the desired columns vertical alignment + | + | - the elements of the array should be either "t", "m" or "b": + | + | * "t": column aligned on the top of the cell + | * "m": column aligned on the middle of the cell + | * "b": column aligned on the bottom of the cell + | + | set_cols_width(self, array) + | Set the desired columns width + | + | - the elements of the array should be integers, specifying the + | width of each column. For example: + | + | [10, 20, 5] + | + | set_deco(self, deco) + | Set the table decoration + | + | - 'deco' can be a combination of: + | + | Texttable.BORDER: Border around the table + | Texttable.HEADER: Horizontal line below the header + | Texttable.HLINES: Horizontal lines between rows + | Texttable.VLINES: Vertical lines between columns + | + | All of them are enabled by default + | + | - example: + | + | Texttable.BORDER | Texttable.HEADER + | + | set_header_align(self, array) + | Set the desired header alignment + | + | - the elements of the array should be either "l", "c" or "r": + | + | * "l": column flushed left + | * "c": column centered + | * "r": column flushed right + | + | set_max_width(self, max_width) + | Set the maximum width of the table + | + | - max_width is an integer, specifying the maximum width of the table + | - if set to 0, size is unlimited, therefore cells won't be wrapped + | + | set_precision(self, width) + | Set the desired precision for float/exponential formats + | + | - width must be an integer >= 0 + | + | - default value is set to 3 + | + | ---------------------------------------------------------------------- + | Data and other attributes defined here: + | + | BORDER = 1 + | + | HEADER = 2 + | + | HLINES = 4 + | + | VLINES = 8 +DATA + __all__ = ['Texttable', 'ArraySizeError'] + __author__ = 'Gerome Fournier <jef(at)foutaise.org>' + __credits__ = 'Jeff Kowalczyk:\n - textwrap improved import\n ...at... + __license__ = 'MIT' + __version__ = '1.6.7' +VERSION + 1.6.7 +AUTHOR + Gerome Fournier <jef(at)foutaise.org> +CREDITS + Jeff Kowalczyk: + - textwrap improved import + - comment concerning header output + Anonymous: + - add_rows method, for adding rows in one go + Sergey Simonenko: + - redefined len() function to deal with non-ASCII characters + Roger Lew: + - columns datatype specifications + Brian Peterson: + - better handling of unicode errors + Frank Sachsenheim: + - add Python 2/3-compatibility + Maximilian Hils: + - fix minor bug for Python 3 compatibility + frinkelpi: + - preserve empty lines +``` +## Forks +* [latextable](https://github.com/JAEarly/latextable) is a fork of texttable that provide a LaTeX backend. + +%package help +Summary: Development documents and examples for texttable +Provides: python3-texttable-doc +%description help + abcd 67.000 6.540e+02 89 128.001 + efghijk 67.543 6.540e-01 90 1.280e+22 + lmn 0.000 5.000e-78 89 0.000 + opqrstu 0.023 5.000e+78 92 1.280e+22 +CLASSES + class Texttable + | Methods defined here: + | + | __init__(self, max_width=80) + | Constructor + | + | - max_width is an integer, specifying the maximum width of the table + | - if set to 0, size is unlimited, therefore cells won't be wrapped + | + | add_row(self, array) + | Add a row in the rows stack + | + | - cells can contain newlines and tabs + | + | add_rows(self, rows, header=True) + | Add several rows in the rows stack + | + | - The 'rows' argument can be either an iterator returning arrays, + | or a by-dimensional array + | - 'header' specifies if the first row should be used as the header + | of the table + | + | draw(self) + | Draw the table + | + | - the table is returned as a whole string + | + | header(self, array) + | Specify the header of the table + | + | reset(self) + | Reset the instance + | + | - reset rows and header + | + | set_chars(self, array) + | Set the characters used to draw lines between rows and columns + | + | - the array should contain 4 fields: + | + | [horizontal, vertical, corner, header] + | + | - default is set to: + | + | ['-', '|', '+', '='] + | + | set_cols_align(self, array) + | Set the desired columns alignment + | + | - the elements of the array should be either "l", "c" or "r": + | + | * "l": column flushed left + | * "c": column centered + | * "r": column flushed right + | + | set_cols_dtype(self, array) + | Set the desired columns datatype for the cols. + | + | - the elements of the array should be either a callable or any of + | "a", "t", "f", "e" or "i": + | + | * "a": automatic (try to use the most appropriate datatype) + | * "t": treat as text + | * "f": treat as float in decimal format + | * "e": treat as float in exponential format + | * "i": treat as int + | * a callable: should return formatted string for any value given + | + | - by default, automatic datatyping is used for each column + | + | set_cols_valign(self, array) + | Set the desired columns vertical alignment + | + | - the elements of the array should be either "t", "m" or "b": + | + | * "t": column aligned on the top of the cell + | * "m": column aligned on the middle of the cell + | * "b": column aligned on the bottom of the cell + | + | set_cols_width(self, array) + | Set the desired columns width + | + | - the elements of the array should be integers, specifying the + | width of each column. For example: + | + | [10, 20, 5] + | + | set_deco(self, deco) + | Set the table decoration + | + | - 'deco' can be a combination of: + | + | Texttable.BORDER: Border around the table + | Texttable.HEADER: Horizontal line below the header + | Texttable.HLINES: Horizontal lines between rows + | Texttable.VLINES: Vertical lines between columns + | + | All of them are enabled by default + | + | - example: + | + | Texttable.BORDER | Texttable.HEADER + | + | set_header_align(self, array) + | Set the desired header alignment + | + | - the elements of the array should be either "l", "c" or "r": + | + | * "l": column flushed left + | * "c": column centered + | * "r": column flushed right + | + | set_max_width(self, max_width) + | Set the maximum width of the table + | + | - max_width is an integer, specifying the maximum width of the table + | - if set to 0, size is unlimited, therefore cells won't be wrapped + | + | set_precision(self, width) + | Set the desired precision for float/exponential formats + | + | - width must be an integer >= 0 + | + | - default value is set to 3 + | + | ---------------------------------------------------------------------- + | Data and other attributes defined here: + | + | BORDER = 1 + | + | HEADER = 2 + | + | HLINES = 4 + | + | VLINES = 8 +DATA + __all__ = ['Texttable', 'ArraySizeError'] + __author__ = 'Gerome Fournier <jef(at)foutaise.org>' + __credits__ = 'Jeff Kowalczyk:\n - textwrap improved import\n ...at... + __license__ = 'MIT' + __version__ = '1.6.7' +VERSION + 1.6.7 +AUTHOR + Gerome Fournier <jef(at)foutaise.org> +CREDITS + Jeff Kowalczyk: + - textwrap improved import + - comment concerning header output + Anonymous: + - add_rows method, for adding rows in one go + Sergey Simonenko: + - redefined len() function to deal with non-ASCII characters + Roger Lew: + - columns datatype specifications + Brian Peterson: + - better handling of unicode errors + Frank Sachsenheim: + - add Python 2/3-compatibility + Maximilian Hils: + - fix minor bug for Python 3 compatibility + frinkelpi: + - preserve empty lines +``` +## Forks +* [latextable](https://github.com/JAEarly/latextable) is a fork of texttable that provide a LaTeX backend. + +%prep +%autosetup -n texttable-1.6.7 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-texttable -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Mon Apr 10 2023 Python_Bot <Python_Bot@openeuler.org> - 1.6.7-1 +- Package Spec generated @@ -0,0 +1 @@ +83eb15fb541dd857ff051a8d0c979b9c texttable-1.6.7.tar.gz |
