15
0
Files
python-bytecode/python-bytecode.spec

63 lines
1.8 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-bytecode
#
Accepting request 1041911 from home:yarunachalam:branches:devel:languages:python - Update to 0.14.0 * New features: Removed the peephole optimizer PR #107 Basically changes in Python 3.11 made it hard to port and the maintenance cost exceeded the perceived use. It could be re-added if there is a demand for it. Add support for Python 3.11 PR #107 Support for Python 3.11, comes with a number of changes reflecting changes in CPython bytecode itself: support for the exception table in ConcreteBytecode support for pseudo-instruction TryBegin and TryEnd describing the exception table in Bytecode and ControlflowGraph new keyword arguments in conversion method related to computations required for the exception table handling of CACHE opcode at the ConcreteBytecode level handling of the ability of LOAD_GLOBAL to push NULL (the argument is now a tuple[bool, str]) support for end_lineno and column offsets in instructions support for co_qualname (as qualname on bytecode objects) and a number of internal changes related to changes in the internal bytecode representation. Add type annotations and make types stricter PR # 105 In particular, ConcreteInstr does not inherit from Instr anymore and one cannot use ConcreteInstr in Bytecode object. This is saner than before. * Bugfixes: Removed EXC_MATCH from the Compare enumeration starting with Python 3.9. The new JUMP_IF_NOT_EXC_MATCH opcode should be used instead. Removed IN, NOT_IN, IS, NOT_IS from the Compare enumeration starting with Python 3.9. The new CONTAINS_OP and IS_OP opcodes should be used instead. Add proper pre and post stack effects to all opcodes (up to Python 3.11) PR #106 #107 * Maintenance: Make the install process PEP517 compliant PR #97 Drop support for Python 3.6 and 3.7 PR #100 OBS-URL: https://build.opensuse.org/request/show/1041911 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-bytecode?expand=0&rev=6
2022-12-11 11:11:41 +00:00
# Copyright (c) 2022 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/
#
Name: python-bytecode
Accepting request 1041911 from home:yarunachalam:branches:devel:languages:python - Update to 0.14.0 * New features: Removed the peephole optimizer PR #107 Basically changes in Python 3.11 made it hard to port and the maintenance cost exceeded the perceived use. It could be re-added if there is a demand for it. Add support for Python 3.11 PR #107 Support for Python 3.11, comes with a number of changes reflecting changes in CPython bytecode itself: support for the exception table in ConcreteBytecode support for pseudo-instruction TryBegin and TryEnd describing the exception table in Bytecode and ControlflowGraph new keyword arguments in conversion method related to computations required for the exception table handling of CACHE opcode at the ConcreteBytecode level handling of the ability of LOAD_GLOBAL to push NULL (the argument is now a tuple[bool, str]) support for end_lineno and column offsets in instructions support for co_qualname (as qualname on bytecode objects) and a number of internal changes related to changes in the internal bytecode representation. Add type annotations and make types stricter PR # 105 In particular, ConcreteInstr does not inherit from Instr anymore and one cannot use ConcreteInstr in Bytecode object. This is saner than before. * Bugfixes: Removed EXC_MATCH from the Compare enumeration starting with Python 3.9. The new JUMP_IF_NOT_EXC_MATCH opcode should be used instead. Removed IN, NOT_IN, IS, NOT_IS from the Compare enumeration starting with Python 3.9. The new CONTAINS_OP and IS_OP opcodes should be used instead. Add proper pre and post stack effects to all opcodes (up to Python 3.11) PR #106 #107 * Maintenance: Make the install process PEP517 compliant PR #97 Drop support for Python 3.6 and 3.7 PR #100 OBS-URL: https://build.opensuse.org/request/show/1041911 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-bytecode?expand=0&rev=6
2022-12-11 11:11:41 +00:00
Version: 0.14.0
Release: 0
Summary: Python module to generate and modify bytecode
License: MIT
Group: Development/Languages/Python
URL: https://github.com/vstinner/bytecode
Source: https://files.pythonhosted.org/packages/source/b/bytecode/bytecode-%{version}.tar.gz
BuildRequires: %{python_module base >= 3.8}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module typing_extensions if %python-base < 3.10}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: (python-typing-extensions if python-base < 3.10)
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module pytest}
# /SECTION
%python_subpackages
%description
Python module to generate and modify bytecode
%prep
%setup -q -n bytecode-%{version}
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pytest
%files %{python_files}
%doc README.rst
%license COPYING
%{python_sitelib}/bytecode
%{python_sitelib}/bytecode-%{version}*-info
%changelog