File python-peak-util-assembler.spec of Package python-peak-util-assembler
#
# spec file for package python-peak-util-assembler
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
Name: python-peak-util-assembler
Version: 0.5
Release: 0
Summary: Generate Python code objects by "assembling" bytecode
License: Python-2.0 and ZPL-2.0
Group: Development/Languages/Python
Url: http://pypi.python.org/pypi/BytecodeAssembler
Source0: BytecodeAssembler-%{version}.zip
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel
BuildRequires: python-nose
BuildRequires: python-setuptools
BuildRequires: unzip
Requires: python-decoratortools >= 1.2
Requires: python-peak-util-symbols >= 1.0
%if 0%{?suse_version}
%py_requires
%if 0%{?suse_version} > 1110
BuildArch: noarch
%endif
%endif
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%description
peak.util.assembler is a simple bytecode assembler module that handles most
low-level bytecode generation details like jump offsets, stack size tracking,
line number table generation, constant and variable name index tracking, etc.
That way, you can focus your attention on the desired semantics of your
bytecode instead of on these mechanical issues.
In addition to a low-level opcode-oriented API for directly generating specific
Python bytecodes, this module also offers an extensible mini-AST framework for
generating code from high-level specifications. This framework does most of
the work needed to transform tree-like structures into linear bytecode
instructions, and includes the ability to do compile-time constant folding.
%prep
%setup -q -n BytecodeAssembler-%{version}
%build
python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%files
%defattr(-,root,root)
%doc README.txt
%{python_sitelib}/*
%changelog