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

76 lines
2.2 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-bitstring
#
# Copyright (c) 2010 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/
%define modname bitstring
Summary: Simple Construction, Analysis and Modification of Binary Data
Name: python-%{modname}
Version: 1.3.0
Release: 1
Source0: %{modname}-%{version}.tar.bz2
Patch0: %{name}.py.diff
License: MIT License
Group: Development/Libraries/Python
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
%if %{?suse_version: %{suse_version} > 1110} %{!?suse_version:1}
BuildArch: noarch
%endif
Vendor: Scott Griffiths <scott@griffiths.name>
Url: http://python-bitstring.googlecode.com
BuildRequires: python-devel
%py_requires
%description
bitstring is a pure Python module designed to help make
the creation and analysis of binary data as simple and natural as possible.
BitStrings can be constructed from integers (big and little endian), hex,
octal, binary, strings or files. They can be sliced, joined, reversed,
inserted into, overwritten, etc. with simple functions or slice notation.
They can also be read from, searched and replaced, and navigated in,
similar to a file or stream.
Author
------
Scott Griffiths <scott@griffiths.name>
%prep
%setup -q -n %{modname}-%{version}
%patch0
%build
python setup.py build
chmod -x %{modname}.py
%install
python setup.py install \
--root=$RPM_BUILD_ROOT \
--prefix=%{_prefix} \
--record=%{name}.files
%check
cd test
python test_bitstring.py -v
%clean
rm -rf $RPM_BUILD_ROOT
%files -f %{name}.files
%defattr(-,root,root)
%changelog