diff --git a/.gitignore b/.gitignore index 75020f0..679d671 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ /libbytesize-1.2.tar.gz /libbytesize-1.3.tar.gz /libbytesize-1.4.tar.gz +/libbytesize-2.0.tar.gz diff --git a/libbytesize.spec b/libbytesize.spec index 7b3fb4d..e65fce6 100644 --- a/libbytesize.spec +++ b/libbytesize.spec @@ -1,24 +1,23 @@ %define realname bytesize -%define with_python2 1 %define with_python3 1 %define with_gtk_doc 1 +%define with_tools 1 %if (! 0%{?fedora} && 0%{?rhel} <= 7) || %{with_python3} == 0 %define with_python3 0 %define python3_opts --without-python3 +%define with_tools 0 %endif -# python2 is not available on RHEL > 7 and not needed on Fedora > 28 -%if 0%{?rhel} > 7 || 0%{?fedora} > 28 || %{with_python2} == 0 -%define with_python2 0 -%define python2_opts --without-python2 +%if %{with_tools} != 1 +%define tools_opts --without-tools %endif -%define configure_opts %{?python3_opts} %{?python2_opts} +%define configure_opts %{?python3_opts} %{?tools_opts} Name: libbytesize -Version: 1.4 -Release: 2%{?dist} +Version: 2.0 +Release: 1%{?dist} Summary: A library for working with sizes in bytes License: LGPLv2+ URL: https://github.com/storaged-project/libbytesize @@ -27,11 +26,8 @@ Source0: https://github.com/storaged-project/libbytesize/releases/download/% BuildRequires: gcc BuildRequires: gmp-devel BuildRequires: mpfr-devel -BuildRequires: pcre-devel +BuildRequires: pcre2-devel BuildRequires: gettext-devel -%if %{with_python2} -BuildRequires: python2-devel -%endif %if %{with_python3} BuildRequires: python3-devel %endif @@ -53,19 +49,6 @@ Requires: %{name}%{?_isa} = %{version}-%{release} This package contains header files and pkg-config files needed for development with the libbytesize library. -%if %{with_python2} -%package -n python2-%{realname} -Summary: Python 2 bindings for libbytesize -%{?python_provide:%python_provide python2-%{realname}} -%{?python_provide:%python_provide python2-libbytesize} -Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: python2-six - -%description -n python2-%{realname} -This package contains Python 2 bindings for libbytesize making the use of -the library from Python 2 easier and more convenient. -%endif - %if %{with_python3} %package -n python3-%{realname} Summary: Python 3 bindings for libbytesize @@ -77,6 +60,16 @@ This package contains Python 3 bindings for libbytesize making the use of the library from Python 3 easier and more convenient. %endif +%if %{with_tools} +%package tools +Summary: Various nice tools based on libbytesize +Requires: python3-%{realname} + +%description tools +Various nice tools based on libbytesize, in particular the calculator +for doing calculations with storage sizes. +%endif + %prep %setup -q -n %{name}-%{version} @@ -108,12 +101,6 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm} %{_datadir}/gtk-doc/html/libbytesize %endif -%if %{with_python2} -%files -n python2-%{realname} -%dir %{python2_sitearch}/bytesize -%{python2_sitearch}/bytesize/* -%endif - %if %{with_python3} %files -n python3-%{realname} %dir %{python3_sitearch}/bytesize @@ -121,7 +108,30 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm} %{python3_sitearch}/bytesize/__pycache__/* %endif +%if %{with_tools} +%files tools +%{_bindir}/bscalc +%{_mandir}/man1/bscalc.1* +%endif + %changelog +* Thu Apr 25 2019 Vojtech Trefny - 2.0-1 +- Assume the given expression is in bytes if no unit is given (v.podzimek) +- Add a man page for the bscalc tool (v.podzimek) +- Add the '--version' option to bs_calc.py (v.podzimek) +- Fix parsing of exponential representations of real numbers (v.podzimek) +- Only support modulo between two Size instances (v.podzimek) +- Add a summary to the end of ./configure output (v.podzimek) +- Exit with 1 from configure if there were failures (v.podzimek) +- Add tools to autotools and packaging (v.podzimek) +- Add a simple bytesize calculator tool (v.podzimek) +- Add support for floor division by a non-integer number in Python (v.podzimek) +- Port to pcre2 (vtrefny) +- Remove Python 2 support (vtrefny) +- Allow running tests using installed library (vtrefny) +- Add all "public" python API symbols to __init__.py (vtrefny) +- Run all libbytesize tests from one script (vtrefny) + * Fri Feb 01 2019 Fedora Release Engineering - 1.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/sources b/sources index a84a003..ea9a905 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libbytesize-1.4.tar.gz) = 54aba1f605ad662ff525c47206e8342e727c807692225361f1fa8d6a66c00f2740fc3d3672978eec2806227d85f146034042a9808e458d8d6271a08934032959 +SHA512 (libbytesize-2.0.tar.gz) = 9d2a18930d0d900262ced4abd5cd358896570eadb06435f1b9aba5484ca530478b65dfb4982e8acf77ca4519a2d8a1dc236d42f5fa1ecbd7461949b282ef44a1