File python-pyjamas.spec of Package python-pyjamas

%define modname pyjamas
Name:           python-%{modname}
Version:        0.7
Release:        4
Summary:        Python Web Widget Set and Python-to-JavaScript Compiler
URL:            http://code.google.com/p/pyjamas/
License:        Apache License 2.0
Group:          Development/Languages/Python
Source:         http://pyjamas.googlecode.com/files/%{modname}-%{version}.tar.bz2
Source1:        build-examples.py
Patch:          destdir-0.7.patch
BuildRoot:      %{_tmppath}/%{name}-buildroot
%{py_requires}
BuildRequires:  fdupes python-devel
%if %{?suse_version: %{suse_version} > 1110} %{!?suse_version:1}
BuildArch: noarch
%else
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True)")}
%endif

%description
Pyjamas provides a python-to-javascript Compiler and a Web Widget set, the
combination of which allows developers to easily write well-designed desktop-
like Rich Media Applications in python classes and modules that will execute in
all major web browsers. without having to write a single line of javascript.
Pyjamas is a port of Google Web Toolkit.

Authors:
--------
    The Pyjamas Project <lkcl@lkcl.net>

%package desktop
Summary:      Pyjamas Desktop
License:      Apache License 2.0
Group:        Development/Languages/Python
Requires:     %{name} = %{version} python-hulahop

%description desktop

Pyjamas provides a python-to-javascript Compiler and a Web Widget set, the
combination of which allows developers to easily write well-designed desktop-
like Rich Media Applications in python classes and modules that will execute in
all major web browsers. without having to write a single line of javascript.
Pyjamas is a port of Google Web Toolkit.

This package allows pyjamas scripts to be run directly in Python on the desktop
without a web browser and without translating the code to javascript.

Authors:
--------
    The Pyjamas Project <lkcl@lkcl.net>

%package examples
Summary:      Examples for Pyjamas
License:      Apache License 2.0
Group:        Development/Languages/Python
Requires:     %{name} = %{version}

%description examples

Pyjamas provides a python-to-javascript Compiler and a Web Widget set, the
combination of which allows developers to easily write well-designed desktop-
like Rich Media Applications in python classes and modules that will execute in
all major web browsers. without having to write a single line of javascript.
Pyjamas is a port of Google Web Toolkit.

This package contains Pyjamas examples under /usr/share/pyjamas/examples

Authors:
--------
    The Pyjamas Project <lkcl@lkcl.net>

%package tests
Summary:      Tests for Pyjamas
License:      Apache License 2.0
Group:        Development/Languages/Python
Requires:     %{name} = %{version}

%description tests

Pyjamas provides a python-to-javascript Compiler and a Web Widget set, the
combination of which allows developers to easily write well-designed desktop-
like Rich Media Applications in python classes and modules that will execute in
all major web browsers. without having to write a single line of javascript.
Pyjamas is a port of Google Web Toolkit.

This package contains Pyjamas tests under /usr/share/pyjamas/pyjs/tests

Authors:
--------
    The Pyjamas Project <lkcl@lkcl.net>

%prep
%setup -q -n %{modname}-%{version}
%patch -p1

%build

%install
export DESTDIR="%{buildroot}"
python bootstrap.py /usr/share/pyjamas /usr
python run_bootstrap_first_then_setup.py install --prefix=%{_prefix} --root=$RPM_BUILD_ROOT
cd %{buildroot}%{_datadir}/pyjamas/examples/
python %{SOURCE1}
%fdupes %{buildroot}

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
/usr/bin/pyjsbuild
/usr/bin/pyjscompile
/usr/bin/pyjampiler
%{python_sitelib}/pyjs
%{python_sitelib}/Pyjamas-%{version}-py%{py_ver}.egg-info
%dir %{_datadir}/pyjamas
# %{_datadir}/pyjamas/addons
%{_datadir}/pyjamas/builder
%{_datadir}/pyjamas/library
%dir %{_datadir}/pyjamas/pyjs/
%{_datadir}/pyjamas/pyjs/src
%{_datadir}/pyjamas/stubs

%files desktop
%defattr(-,root,root,-)
%{python_sitelib}/pyjd

%files examples
%defattr(-,root,root,-)
/usr/share/pyjamas/examples

%files tests
%defattr(-,root,root,-)
/usr/share/pyjamas/pyjs/tests

%changelog
openSUSE Build Service is sponsored by