Name: libbytesize Version: 0.7 Release: 5%{?dist} Summary: A library for working with sizes in bytes License: LGPLv2+ URL: https://github.com/rhinstaller/libbytesize Source0: https://github.com/rhinstaller/libbytesize/archive/%{name}-%{version}.tar.gz Patch0: except_in_del.patch Patch1: none_as_operand.patch %define realname bytesize BuildRequires: gmp-devel BuildRequires: mpfr-devel BuildRequires: pcre-devel BuildRequires: gettext-devel BuildRequires: python-devel BuildRequires: python3-devel BuildRequires: gtk-doc %description The libbytesize is a C library that facilitates work with sizes in bytes. Be it parsing the input from users or producing a nice human readable representation of a size in bytes this library takes localization into account. It also provides support for sizes bigger than MAXUINT64. %package devel Summary: Development files for libbytesize Requires: %{name}%{?_isa} = %{version}-%{release} %description devel This package contains header files and pkg-config files needed for development with the libbytesize library. %package -n python-%{realname} Summary: Python 2 bindings for libbytesize Provides: python2-%{realname} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release} Requires: python-six %description -n python-%{realname} This package contains Python 2 bindings for libbytesize making the use of the library from Python 2 easier and more convenient. %package -n python3-%{realname} Summary: Python 3 bindings for libbytesize Requires: %{name}%{?_isa} = %{version}-%{release} Requires: python3-six %description -n python3-%{realname} This package contains Python 3 bindings for libbytesize making the use of the library from Python 3 easier and more convenient. %prep %setup -q -n %{name}-%{version} %patch0 -p1 %patch1 -p1 %build %configure %{__make} %{?_smp_mflags} %install %{make_install} find %{buildroot} -type f -name "*.la" | xargs %{__rm} %find_lang %{name} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files -f %{name}.lang %doc README.rst %{!?_licensedir:%global license %%doc} %license LICENSE %{_libdir}/libbytesize.so.* %files devel %{_libdir}/libbytesize.so %dir %{_includedir}/bytesize %{_includedir}/bytesize/bs_size.h %{_libdir}/pkgconfig/bytesize.pc %{_datadir}/gtk-doc/html/libbytesize %files -n python-%{realname} %{python2_sitearch}/bytesize/* %files -n python3-%{realname} %{python3_sitearch}/bytesize/* %{python3_sitearch}/bytesize/__pycache__/* %changelog * Fri Dec 16 2016 Vratislav Podzimek - 0.7-5 - Neutralize None as an operand for math operations (vpodzime) Resolves: rhbz#1404361 * Tue Sep 20 2016 Vratislav Podzimek - 0.7-3 - Prevent ignored exceptions in __del__ from happening (vpodzime) * Tue Jul 19 2016 Fedora Release Engineering - 0.7-2 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Tue May 17 2016 Vratislav Podzimek - 0.7-1 - Re-run autogen.sh and configure before updating the .pot file (vpodzime) - Change where tests on translated strings are run. (dshea) - Squashed 'translation-canary/' changes from d6c0708..840c2d6 (dshea) - Make sure we get the tests result report in 'make ci' (vpodzime) - Add a new generic error code/enum for failures (vpodzime) - Do not ignore the return value from asprintf() (vpodzime) - Beware of the radix char when converting to Decimal (#1325705) (vpodzime) * Fri May 6 2016 Vratislav Podzimek - 0.6-2 - Beware of unsigned long int on 32bit arches (#1333149) (vpodzime) * Tue May 03 2016 Vratislav Podzimek - 0.6-1 - Add support for the ROUND_HALF_UP rounding mode (vpodzime) - Make sure we return the right radix char in human_readable() (vpodzime) - Allocate enough memory for char->str replacements (vpodzime) * Tue Apr 26 2016 Vratislav Podzimek - 0.5-1 - Create both libbytesize-$version and $version tags (vpodzime) - Update the .pot file with the new version (vpodzime) - Improve how we create changelog (vpodzime) - Try harder when getting OverflowError in division (#1326897) (vpodzime) - Neutralize the radix char before passing string to MPFR (#1326108) (vpodzime) - Run tests with en_US and fr_FR locales (vpodzime) - Run the tests with both python2 and python3 again (vpodzime) - Do not run the same tests 3 times as part of the 'ci' target (vpodzime) - Don't fail if just the best-effort cleanup fails (vpodzime) - Throw away the new .pot file when just running tests (vpodzime) - Make sure we return one of -1, 0, 1 from cmp functions (#1326113) (vpodzime) - Use cmp_bytes(size, bytes) when comparing to 0 (vpodzime) - Ignore all .po~ files (vpodzime) - Add translator comments (dshea) - Integrate translation-canary into the build. (dshea) - Run the translation-canary tests from make check. (dshea) - Squashed 'translation-canary/' content from commit d6c0708 (dshea) - Make 'make check' work. (dshea) - Remove files from po/ we don't need to track (vpodzime) - Ignore the compiled translation files (vpodzime) - Distribute and package the translations (vpodzime) - Add the necessary pieces for getting translations (vpodzime) * Thu Apr 14 2016 Vratislav Podzimek - 0.4-3 - Only require -lgmp and -lmpfr for static linking (vpodzime) * Fri Mar 11 2016 Vratislav Podzimek - 0.4-2 - Do not try to delete the C struct twice (vpodzime) * Wed Mar 09 2016 Vratislav Podzimek - 0.4-1 - Add the __init__.py file to provide a proper package (vpodzime) - Merge pull request #7 from vpodzime/master-decimal_locale (vpodzime) - Make sure we pass a locale-agnostic string to Decimal() (vpodzime) - Adapt the package description to no longer using GI (vpodzime) - Make Size instances hashable (vpodzime) - Sync the spec file with downstream (vpodzime) * Wed Mar 9 2016 Vratislav Podzimek - 0.3-3 - Make sure we pass a locale-agnostic string to Decimal() (vpodzime) * Mon Mar 7 2016 Vratislav Podzimek - 0.3-2 - Make Size instances hashable (vpodzime) * Fri Feb 26 2016 Vratislav Podzimek - 0.3-1 - Packaging changes related to getting rid of GLib/GObject (vpodzime) - Adapt the python bindings and tests (vpodzime) - Get rid of GObject and GLib (vpodzime) - Define the __divmod__ method even for not dividing by Size (vpodzime) * Thu Feb 04 2016 Fedora Release Engineering - 0.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Tue Nov 10 2015 Fedora Release Engineering - 0.2-2 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 * Fri Oct 23 2015 Vratislav Podzimek - 0.2-1 - Distribute the tests for overrides (vpodzime) - Fix the rpmlog target (vpodzime) - Respect the signs when doing division (vpodzime) - Add two more internal methods that may be required (vpodzime) - Do not pass negative numbers as guint64 when comparing with negative ints (vpodzime) - Round toward zero when converting bytes from float to int (vpodzime) - Make sure we return Size if doing operations with big integers (vpodzime) - Implement the __divmod__() method (vpodzime) - Do not try to convert negative int to an unsigned int when multiplying (vpodzime) - Fix and test the __deepcopy__ method (vpodzime) - Implement the evaluation of Size instance as a bool value (vpodzime) - Fix some issues in comparison functions and add tests (vpodzime) - Add a function for getting string representation of a unit (vpodzime) - Hook the overrides tests to the 'test' target (vpodzime) - Merge pull request #4 from japokorn/master-tests_03_python_override (vpodzime) - Added tests for Python override (japokorn) - Make sure our tests don't get broken by installed overrides (vpodzime) * Wed Oct 07 2015 Vratislav Podzimek - 0.1-1 - Initial release