%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} Name: emacs-pymacs Version: 0.23 Release: 1%{?dist} Summary: Use python as an extension language for Emacs Group: Applications/Editors License: GPLv2 URL: http://pymacs.progiciels-bpi.ca/ Source0: http://pymacs.progiciels-bpi.ca/archives/Pymacs.tar.gz Source1: pymacs-init.el BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: emacs BuildRequires: python-docutils Requires: emacs(bin) >= %{_emacs_version} %description Pymacs is a powerful tool which, once started from Emacs, allows both-way communication between Emacs Lisp and Python. Pymacs aims Python as an extension language for Emacs rather than the other way around, and this asymmetry is reflected in some design choices. Within Emacs Lisp code, one may load and use Python modules. Python functions may themselves use Emacs services, and handle Emacs Lisp objects kept in Emacs Lisp space. %package el Summary: Elisp source files for %{name} under GNU Emacs Group: Applications/Editors Requires: %{name} = %{version}-%{release} %description el This package contains elisp sources for %{name}. You do not need to install this to run %{name}. %prep %setup -q -n Pymacs-%{version} %{__sed} -i -e 1d __init__.py.in %{__sed} -i -e 1d Pymacs/pymacs.py %{__chmod} a-x contrib/rebox/rebox %build %{__python} setup.py build %{_emacs_bytecompile} pymacs.el rst2html pymacs.rst > pymacs.html rst2latex --use-latex-toc --input-encoding=UTF-8 pymacs.rst pymacs.tex pdflatex pymacs.tex pdflatex pymacs.tex %install rm -rf %{buildroot} %{__python} setup.py install -O1 --skip-build --root %{buildroot} %{__install} -m 755 -d %{buildroot}%{_emacs_sitelispdir} %{__install} -m 755 -d %{buildroot}%{_emacs_sitestartdir} %{__install} -m 644 pymacs.el pymacs.elc %{buildroot}%{_emacs_sitelispdir} %{__install} -m 644 %{SOURCE1} %{buildroot}%{_emacs_sitestartdir} %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc ChangeLog COPYING README THANKS TODO pymacs.rst pymacs.html pymacs.pdf contrib %{python_sitelib}/Pymacs %{python_sitelib}/Pymacs*.egg-info %{_emacs_sitelispdir}/pymacs.elc %{_emacs_sitestartdir}/pymacs-init.el %files el %defattr(-,root,root,-) %{_emacs_sitelispdir}/pymacs.el %changelog * Sun May 9 2010 Lev Shamardin - 0.23-1 - Initial package version.