File python-pyxb.spec of Package python-pyxb

#
# spec file for package python-pyxb
#
# Copyright (c) 2015 SUSE LINUX 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 realnam PyXB
%if 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%else
BuildArch:      noarch
%py_requires
%endif
Name:           python-pyxb
Version:        1.2.4
Release:        0
Summary:        Python class code generator based on XMLSchemas
License:        Apache-2.0
Group:          Development/Tools
Url:            http://pyxb.sourceforge.net/
Source0:        http://downloads.sourceforge.net/pyxb/%{realnam}-%{version}.tar.gz
BuildRequires:  fdupes
BuildRequires:  python-devel
BuildRequires:  python-xml
Requires:       python-xml
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
PyXB is a pure Python package that generates Python code for classes that correspond to data structures defined by XMLSchema.
In concept it is similar to JAXB for Java and CodeSynthesis XSD for C++.

%prep
%setup -q -n %{realnam}-%{version}

%build
python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%fdupes -s %{buildroot}

%check
python setup.py test

%files
%defattr(-,root,root)
%doc LICENSE NOTICE PKG-INFO README.txt
%{python_sitelib}/pyxb/
%{python_sitelib}/PyXB-%{version}-*.egg-info
%{_bindir}/pyxbdump
%{_bindir}/pyxbgen
%{_bindir}/pyxbwsdl

%changelog
openSUSE Build Service is sponsored by