%define pyver 26 %define pybasever 2.6 %define __python /usr/bin/python%{pybasever} %define __os_install_post %{__python26_os_install_post} %{!?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(1)")} %global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') Name: pyjamas%{pyver} Version: 0.7 Release: 3%{?dist} Summary: A python to Javascript compiler, Widget set, Framework and Toolkit Group: Development/Languages License: ASL 2.0 URL: http://pyjs.org/ # When using a SVN snapshot: # The source for this package was pulled from upstream's vcs. Use the # following commands to generate the tarball: # svn export -r 2416 https://pyjamas.svn.sourceforge.net/svnroot/pyjamas/trunk pyjamas-20100414 # tar -czvf pyjamas-20100414.tar.gz pyjamas-20100414 Source0: http://downloads.sourceforge.net/project/pyjamas/pyjamas/0.7/pyjamas-0.7.tgz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python26-devel BuildRequires: python26-distribute %description Pyjamas is a python to Javascript compiler, Widget set, Framework and Toolkit for Application development that runs on Web browsers. The developer need not know anything about AJAX: all the AJAX tricks, for all major browsers, are entirely taken care of. %package desktop Summary: Desktop version of pyjamas Group: Development/Languages Requires: %{name} = %{version}-%{release} Requires: xulrunner %description desktop he Desktop version of Pyjamas takes the original Python application (which, in the browser version, is put through a Javascript Compiler), and executes it directly, through the standard Python Interpreter, unmodified. The Pyjamas Infrastructure then uses XULRunner as the Browser Engine, to render the application's widgets. %package ui Summary: User interface widgets for pyjamas Group: Development/Languages Requires: %{name} = %{version}-%{release} %description ui This package contains the User-Interface Widgets that are common to both Pyjamas and Pyjamas-Desktop. %package examples Summary: Example files for pyjamas Group: Development/Languages Requires: %{name} = %{version}-%{release} %description examples This package includes the example files that ship with pyjamas. %package doc Summary: Documentation files for pyjamas Group: Development/Languages Requires: %{name} = %{version}-%{release} %description doc This package includes the documentation files that ship with pyjamas. %prep %setup -q -n pyjamas-0.7 %build %{__python} bootstrap.py $RPM_BUILD_ROOT/usr/share/pyshared $RPM_BUILD_ROOT/usr/share/pyjamas . %{__python} run_bootstrap_first_then_setup.py build %{__python} run_bootstrap_first_then_pyjd_setup.py build %install rm -rf $RPM_BUILD_ROOT export QA_SKIP_BUILD_ROOT=1 %{__python} run_bootstrap_first_then_pyjd_setup.py install --root=$RPM_BUILD_ROOT %{__python} run_bootstrap_first_then_setup.py install --root=$RPM_BUILD_ROOT # byte-compile the library .py files only. ( RPM_BUILD_ROOT=$RPM_BUILD_ROOT/%{python_sitelib}/; export RPM_BUILD_ROOT; /usr/lib/rpm/brp-python-bytecompile %{__python} ) # Install scripts. mkdir -p $RPM_BUILD_ROOT/usr/bin install -p bin/pyjsbuild $RPM_BUILD_ROOT/usr/bin/pyjsbuild26 install -p bin/pyjscompile $RPM_BUILD_ROOT/usr/bin/pyjscompile26 # Fix installed pyjd to not include the build root in path sed -i -e "s|$RPM_BUILD_ROOT||" $RPM_BUILD_ROOT/%{python_sitelib}/pyjd/__init__.py sed -i -e "s|$RPM_BUILD_ROOT||" $RPM_BUILD_ROOT/%{_bindir}/pyjsbuild26 sed -i -e "s|$RPM_BUILD_ROOT||" $RPM_BUILD_ROOT/%{_bindir}/pyjscompile26 # install doc files cp -a doc $RPM_BUILD_ROOT/%{_datadir}/pyjamas/doc %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc CHANGELOG COPYING copyright CREDITS INSTALL.txt README TODO %{python_sitelib}/* %{_datadir}/pyjamas %{_bindir}/pyjscompile26 %{_bindir}/pyjsbuild26 %exclude %{_datadir}/pyjamas/examples %exclude %{_datadir}/pyjamas/doc %exclude %{_datadir}/pyjamas/library/pyjamas/ui %exclude %{python_sitelib}/pyjd %files desktop %defattr(-,root,root,-) %{python_sitelib}/pyjd %files ui %defattr(-,root,root,-) %{_datadir}/pyjamas/library/pyjamas/ui %files examples %defattr(-,root,root,-) %{_datadir}/pyjamas/examples %files doc %defattr(-,root,root,-) %{_datadir}/pyjamas/doc %changelog * Mon May 24 2010 Kevin Fenzi - 0.7-3 - Update some binary names and directories to use 26 * Fri Apr 30 2010 Kevin Fenzi - 0.7-2 - Install pyjsbuild and pyjscompile scripts * Mon Apr 26 2010 Kevin Fenzi - 0.7-1 - Initial version