From a415a5f56174fcad0ad70298da7a945593184f10 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Wed, 8 Mar 2023 06:24:03 +0000 Subject: automatic import of python-bitmath --- python-bitmath.spec | 162 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 python-bitmath.spec (limited to 'python-bitmath.spec') diff --git a/python-bitmath.spec b/python-bitmath.spec new file mode 100644 index 0000000..7c48905 --- /dev/null +++ b/python-bitmath.spec @@ -0,0 +1,162 @@ +%global _empty_manifest_terminate_build 0 +Name: python-bitmath +Version: 1.3.3.1 +Release: 1 +Summary: Pythonic module for representing and manipulating file sizes with different prefix notations (file size unit conversion) +License: MIT +URL: https://github.com/tbielawa/bitmath +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/ec/ec/808245570e00df2e1fe8252903da309f18eb58768f44fecc0215dafbc386/bitmath-1.3.3.1.tar.gz +BuildArch: noarch + + +%description +`bitmath `_ simplifies many +facets of interacting with file sizes in various units. Originally +focusing on file size unit conversion, functionality now includes: +* Converting between **SI** and **NIST** prefix units (``kB`` to ``GiB``) +* Converting between units of the same type (SI to SI, or NIST to NIST) +* Automatic human-readable prefix selection (like in `hurry.filesize `_) +* Basic arithmetic operations (subtracting 42KiB from 50GiB) +* Rich comparison operations (``1024 Bytes == 1KiB``) +* bitwise operations (``<<``, ``>>``, ``&``, ``|``, ``^``) +* Reading a device's storage capacity (Linux/OS X support only) +* `argparse `_ + integration as a custom type +* `progressbar `_ + integration as a better file transfer speed widget +* String parsing +* Sorting +In addition to the conversion and math operations, `bitmath` provides +human readable representations of values which are suitable for use in +interactive shells as well as larger scripts and applications. The +format produced for these representations is customizable via the +functionality included in stdlibs `string.format +`_. +In discussion we will refer to the NIST units primarily. I.e., instead +of "megabyte" we will refer to "mebibyte". The former is ``10^3 = +1,000,000`` bytes, whereas the second is ``2^20 = 1,048,576`` +bytes. When you see file sizes or transfer rates in your web browser, +most of the time what you're really seeing are the base-2 sizes/rates. +**Don't Forget!** The source for bitmath `is available on GitHub +`_. +And did we mention there's almost 200 unittests? `Check them out for +yourself `_. + +%package -n python3-bitmath +Summary: Pythonic module for representing and manipulating file sizes with different prefix notations (file size unit conversion) +Provides: python-bitmath +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-bitmath +`bitmath `_ simplifies many +facets of interacting with file sizes in various units. Originally +focusing on file size unit conversion, functionality now includes: +* Converting between **SI** and **NIST** prefix units (``kB`` to ``GiB``) +* Converting between units of the same type (SI to SI, or NIST to NIST) +* Automatic human-readable prefix selection (like in `hurry.filesize `_) +* Basic arithmetic operations (subtracting 42KiB from 50GiB) +* Rich comparison operations (``1024 Bytes == 1KiB``) +* bitwise operations (``<<``, ``>>``, ``&``, ``|``, ``^``) +* Reading a device's storage capacity (Linux/OS X support only) +* `argparse `_ + integration as a custom type +* `progressbar `_ + integration as a better file transfer speed widget +* String parsing +* Sorting +In addition to the conversion and math operations, `bitmath` provides +human readable representations of values which are suitable for use in +interactive shells as well as larger scripts and applications. The +format produced for these representations is customizable via the +functionality included in stdlibs `string.format +`_. +In discussion we will refer to the NIST units primarily. I.e., instead +of "megabyte" we will refer to "mebibyte". The former is ``10^3 = +1,000,000`` bytes, whereas the second is ``2^20 = 1,048,576`` +bytes. When you see file sizes or transfer rates in your web browser, +most of the time what you're really seeing are the base-2 sizes/rates. +**Don't Forget!** The source for bitmath `is available on GitHub +`_. +And did we mention there's almost 200 unittests? `Check them out for +yourself `_. + +%package help +Summary: Development documents and examples for bitmath +Provides: python3-bitmath-doc +%description help +`bitmath `_ simplifies many +facets of interacting with file sizes in various units. Originally +focusing on file size unit conversion, functionality now includes: +* Converting between **SI** and **NIST** prefix units (``kB`` to ``GiB``) +* Converting between units of the same type (SI to SI, or NIST to NIST) +* Automatic human-readable prefix selection (like in `hurry.filesize `_) +* Basic arithmetic operations (subtracting 42KiB from 50GiB) +* Rich comparison operations (``1024 Bytes == 1KiB``) +* bitwise operations (``<<``, ``>>``, ``&``, ``|``, ``^``) +* Reading a device's storage capacity (Linux/OS X support only) +* `argparse `_ + integration as a custom type +* `progressbar `_ + integration as a better file transfer speed widget +* String parsing +* Sorting +In addition to the conversion and math operations, `bitmath` provides +human readable representations of values which are suitable for use in +interactive shells as well as larger scripts and applications. The +format produced for these representations is customizable via the +functionality included in stdlibs `string.format +`_. +In discussion we will refer to the NIST units primarily. I.e., instead +of "megabyte" we will refer to "mebibyte". The former is ``10^3 = +1,000,000`` bytes, whereas the second is ``2^20 = 1,048,576`` +bytes. When you see file sizes or transfer rates in your web browser, +most of the time what you're really seeing are the base-2 sizes/rates. +**Don't Forget!** The source for bitmath `is available on GitHub +`_. +And did we mention there's almost 200 unittests? `Check them out for +yourself `_. + +%prep +%autosetup -n bitmath-1.3.3.1 + +%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-bitmath -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Wed Mar 08 2023 Python_Bot - 1.3.3.1-1 +- Package Spec generated -- cgit v1.2.3