14
0
forked from pool/python-abseil
Files
python-abseil/python-abseil.spec

67 lines
2.2 KiB
RPMSpec
Raw Permalink Normal View History

#
# spec file for package python-abseil
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Accepting request 1180357 from home:StefanBruens:branches:science - Update to version 2.1.0 * Added: + (flags) Added absl.flags.override_value function to provide FlagHolder with a construct to modify values. + (testing) Added a new method absltest.TestCase.assertDataclassEqual that tests equality of dataclass.dataclass objects with better error messages when the assert fails. * Changed + (flags) absl.flags.argparse_flags.ArgumentParser now correctly inherits an empty instance of FlagValues to ensure that absl flags, such as --flagfile, --undefok are supported. + (testing) Do not exit 5 if tests were skipped on Python 3.12. This follows the CPython change in python/cpython#113856. * Fixed + (flags) The flag foo no longer retains the value bar after FLAGS.foo = bar fails due to a validation error. + (testing) Fixed an issue caused by this Python 3.12.1 change where the test reporter crashes when all tests are skipped. - Update to version 2.0.0 * Changed + absl-py no longer supports Python 3.6. + Support Python 3.12. + (logging) logging.exception can now take exc_info as argument, with default value True. + (testing) For Python 3.11+, the calls to absltest.TestCase.enter_context are forwarded to unittest.TestCase.enterContext (when called via instance) or unittest.TestCase.enterClassContext (when called via class) now. + (testing) absltest.TestCase.assertSameStructure() now uses the test case's equality functions (registered with TestCase.addTypeEqualityFunc()) for comparing leaves of the structure. + (testing) abslTest.TestCase.fail() now names its arguments (self, msg=None, user_msg=None), and not (self, msg=None, prefix=None), better reflecting the behavior and usage of the two message arguments. + DEFINE_enum, DEFINE_multi_enum, and EnumParser now raise errors when enum_values is provided as a single string value. Additionally, EnumParser.enum_values is now stored as a list copy of the provided enum_values parameter. + (testing) Updated paramaterized.CoopTestCase() to use Python 3 metaclass idioms. + (testing) absltest.TestCase.assertSequenceStartsWith now explicitly fail when passed a Mapping or Set object as the whole argument. OBS-URL: https://build.opensuse.org/request/show/1180357 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-abseil?expand=0&rev=28
2024-06-13 09:58:36 +00:00
%{?sle15_python_module_pythons}
Name: python-abseil
Accepting request 1180357 from home:StefanBruens:branches:science - Update to version 2.1.0 * Added: + (flags) Added absl.flags.override_value function to provide FlagHolder with a construct to modify values. + (testing) Added a new method absltest.TestCase.assertDataclassEqual that tests equality of dataclass.dataclass objects with better error messages when the assert fails. * Changed + (flags) absl.flags.argparse_flags.ArgumentParser now correctly inherits an empty instance of FlagValues to ensure that absl flags, such as --flagfile, --undefok are supported. + (testing) Do not exit 5 if tests were skipped on Python 3.12. This follows the CPython change in python/cpython#113856. * Fixed + (flags) The flag foo no longer retains the value bar after FLAGS.foo = bar fails due to a validation error. + (testing) Fixed an issue caused by this Python 3.12.1 change where the test reporter crashes when all tests are skipped. - Update to version 2.0.0 * Changed + absl-py no longer supports Python 3.6. + Support Python 3.12. + (logging) logging.exception can now take exc_info as argument, with default value True. + (testing) For Python 3.11+, the calls to absltest.TestCase.enter_context are forwarded to unittest.TestCase.enterContext (when called via instance) or unittest.TestCase.enterClassContext (when called via class) now. + (testing) absltest.TestCase.assertSameStructure() now uses the test case's equality functions (registered with TestCase.addTypeEqualityFunc()) for comparing leaves of the structure. + (testing) abslTest.TestCase.fail() now names its arguments (self, msg=None, user_msg=None), and not (self, msg=None, prefix=None), better reflecting the behavior and usage of the two message arguments. + DEFINE_enum, DEFINE_multi_enum, and EnumParser now raise errors when enum_values is provided as a single string value. Additionally, EnumParser.enum_values is now stored as a list copy of the provided enum_values parameter. + (testing) Updated paramaterized.CoopTestCase() to use Python 3 metaclass idioms. + (testing) absltest.TestCase.assertSequenceStartsWith now explicitly fail when passed a Mapping or Set object as the whole argument. OBS-URL: https://build.opensuse.org/request/show/1180357 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-abseil?expand=0&rev=28
2024-06-13 09:58:36 +00:00
Version: 2.1.0
Release: 0
Summary: Abseil Python Common Libraries
License: Apache-2.0
URL: https://github.com/abseil/abseil-py
Accepting request 937817 from home:bnavigator:branches:devel:languages:python - Update to version 1.0.0 * absl-py no longer supports Python 2.7, 3.4, 3.5. All versions have reached end-of-life for more than a year now. * New releases will be tagged as vX.Y.Z instead of pypi-vX.Y.Z in the git repo going forward. - Release notes for 0.15.0 * (testing) #128: When running bazel with its --test_filter= flag, it now treats the filters as unittest's -k flag in Python 3.7+. - Release notes for 0.14.1 * Top-level LICENSE file is now exported in bazel. - Release notes for 0.14.0 * #171: Creating argparse_flags.ArgumentParser with argument_default= no longer raises an exception when other absl.flags flags are defined. * #173: absltest now correctly sets up test filtering and fail fast flags when an explicit argv= parameter is passed to absltest.main. - Release notes for 0.13.0 * (app) Type annotations for public app interfaces. * (testing) Added new decorator @absltest.skipThisClass to indicate a class contains shared functionality to be used as a base class for other TestCases, and therefore should be skipped. * (app) Annotated the flag_parser paramteter of run as keyword-only. This keyword-only constraint will be enforced at runtime in a future release. * (app, flags) Flag validations now include all errors from disjoint flag sets, instead of fail fast upon first error from all validators. Multiple validators on the same flag still fails fast. - Release notes for 0.12.0 * (flags) Made EnumClassSerializer and EnumClassListSerializer public. * (flags) Added a required: Optional[bool] = False parameter to DEFINE_* functions. * (testing) flagsaver overrides can now be specified in terms of FlagHolder. * (testing) parameterized.product: Allows testing a method over cartesian product of parameters values, specified as a sequences of values for each parameter or as kwargs-like dicts of parameter values. * (testing) Added public flag holders for --test_srcdir and --test_tmpdir. Users should use absltest.TEST_SRCDIR.value and absltest.TEST_TMPDIR.value instead of FLAGS.test_srcdir and FLAGS.test_tmpdir. * (flags) Made CsvListSerializer respect its delimiter argument. OBS-URL: https://build.opensuse.org/request/show/937817 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-abseil?expand=0&rev=19
2021-12-09 16:56:42 +00:00
Source0: https://github.com/abseil/abseil-py/archive/v%{version}.tar.gz#/abseil-py-%{version}.tar.gz
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Provides: python-absl-py = %{version}
Obsoletes: python-absl-py < %{version}
BuildArch: noarch
%python_subpackages
%description
This package is a collection of Python library code for building Python
applications. The code is collected from Google's own Python code base, and has
been extensively tested and used in production.
* Simple application startup
* Distributed commandline flags system
* Custom logging module with additional features
* Testing utilities
%prep
Accepting request 937817 from home:bnavigator:branches:devel:languages:python - Update to version 1.0.0 * absl-py no longer supports Python 2.7, 3.4, 3.5. All versions have reached end-of-life for more than a year now. * New releases will be tagged as vX.Y.Z instead of pypi-vX.Y.Z in the git repo going forward. - Release notes for 0.15.0 * (testing) #128: When running bazel with its --test_filter= flag, it now treats the filters as unittest's -k flag in Python 3.7+. - Release notes for 0.14.1 * Top-level LICENSE file is now exported in bazel. - Release notes for 0.14.0 * #171: Creating argparse_flags.ArgumentParser with argument_default= no longer raises an exception when other absl.flags flags are defined. * #173: absltest now correctly sets up test filtering and fail fast flags when an explicit argv= parameter is passed to absltest.main. - Release notes for 0.13.0 * (app) Type annotations for public app interfaces. * (testing) Added new decorator @absltest.skipThisClass to indicate a class contains shared functionality to be used as a base class for other TestCases, and therefore should be skipped. * (app) Annotated the flag_parser paramteter of run as keyword-only. This keyword-only constraint will be enforced at runtime in a future release. * (app, flags) Flag validations now include all errors from disjoint flag sets, instead of fail fast upon first error from all validators. Multiple validators on the same flag still fails fast. - Release notes for 0.12.0 * (flags) Made EnumClassSerializer and EnumClassListSerializer public. * (flags) Added a required: Optional[bool] = False parameter to DEFINE_* functions. * (testing) flagsaver overrides can now be specified in terms of FlagHolder. * (testing) parameterized.product: Allows testing a method over cartesian product of parameters values, specified as a sequences of values for each parameter or as kwargs-like dicts of parameter values. * (testing) Added public flag holders for --test_srcdir and --test_tmpdir. Users should use absltest.TEST_SRCDIR.value and absltest.TEST_TMPDIR.value instead of FLAGS.test_srcdir and FLAGS.test_tmpdir. * (flags) Made CsvListSerializer respect its delimiter argument. OBS-URL: https://build.opensuse.org/request/show/937817 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-abseil?expand=0&rev=19
2021-12-09 16:56:42 +00:00
%setup -q -n abseil-py-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python smoke_tests/sample_app.py --echo smoke 2>&1 |grep 'echo is smoke.'
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python smoke_tests/sample_test.py 2>&1 | grep 'msg_for_test'
%files %{python_files}
%license LICENSE
%doc README.md
Accepting request 937817 from home:bnavigator:branches:devel:languages:python - Update to version 1.0.0 * absl-py no longer supports Python 2.7, 3.4, 3.5. All versions have reached end-of-life for more than a year now. * New releases will be tagged as vX.Y.Z instead of pypi-vX.Y.Z in the git repo going forward. - Release notes for 0.15.0 * (testing) #128: When running bazel with its --test_filter= flag, it now treats the filters as unittest's -k flag in Python 3.7+. - Release notes for 0.14.1 * Top-level LICENSE file is now exported in bazel. - Release notes for 0.14.0 * #171: Creating argparse_flags.ArgumentParser with argument_default= no longer raises an exception when other absl.flags flags are defined. * #173: absltest now correctly sets up test filtering and fail fast flags when an explicit argv= parameter is passed to absltest.main. - Release notes for 0.13.0 * (app) Type annotations for public app interfaces. * (testing) Added new decorator @absltest.skipThisClass to indicate a class contains shared functionality to be used as a base class for other TestCases, and therefore should be skipped. * (app) Annotated the flag_parser paramteter of run as keyword-only. This keyword-only constraint will be enforced at runtime in a future release. * (app, flags) Flag validations now include all errors from disjoint flag sets, instead of fail fast upon first error from all validators. Multiple validators on the same flag still fails fast. - Release notes for 0.12.0 * (flags) Made EnumClassSerializer and EnumClassListSerializer public. * (flags) Added a required: Optional[bool] = False parameter to DEFINE_* functions. * (testing) flagsaver overrides can now be specified in terms of FlagHolder. * (testing) parameterized.product: Allows testing a method over cartesian product of parameters values, specified as a sequences of values for each parameter or as kwargs-like dicts of parameter values. * (testing) Added public flag holders for --test_srcdir and --test_tmpdir. Users should use absltest.TEST_SRCDIR.value and absltest.TEST_TMPDIR.value instead of FLAGS.test_srcdir and FLAGS.test_tmpdir. * (flags) Made CsvListSerializer respect its delimiter argument. OBS-URL: https://build.opensuse.org/request/show/937817 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-abseil?expand=0&rev=19
2021-12-09 16:56:42 +00:00
%{python_sitelib}/absl
%{python_sitelib}/absl_py-%{version}*-info
%changelog