Blob Blame History Raw
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%define pkgname SimPy

Name:		python-simpy
Version:	1.6.1
Release:	3
Summary:	Python simulation framework
Group:		Development/Languages
License:	LGPL
URL:		http://simpy.sourceforge.net
Source0:	http://download.sourceforge.net/simpy/SimPy-%{version}.tar.gz
Patch1:		python-simpy-1.6.1-no-shebang.patch
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:	noarch
BuildRequires:	python-devel
Requires:   python-abi = %(%{__python} -c "import sys ; print sys.version[:3]")
Requires:	tkinter

%description
SimPy (= Simulation in Python) is an object-oriented, process-based
discrete-event simulation language based on standard Python. It
provides the modeler with components of a simulation model including
processes, for active components like customers, messages, and
vehicles, and resources, for passive components that form limited
capacity congestion points like servers, checkout counters, and
tunnels. It also provides monitor variables to aid in gathering
statistics. Random variates are provided by the standard Python random
module.

%package doc
Group: Documentation
Summary: Source code documentation for SimPy

%description doc
SimPy (= Simulation in Python) is an object-oriented, process-based
discrete-event simulation language based on standard Python.  This
package contains the source code documentation.


%prep
%setup -q -n %{pkgname}-%{version}
%patch1


%build
%{__python} setup.py build


%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT

 
%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
# choose html over txt files for documentation
%doc *.html PKG-INFO LGPLlicense_files SimPyDocs SimPyModels
%dir %{python_sitelib}/%{pkgname}/
%{python_sitelib}/%{pkgname}/*.py
%{python_sitelib}/%{pkgname}/*.pyc
%ghost %{python_sitelib}/%{pkgname}/*.pyo


%files doc
%defattr(-,root,root)
%doc SimPyDocs/SimPy_Sourcecode_Documentation/*


%changelog
* Mon Dec 26 2005 Sarantis Paskalis <paskalis@di.uoa.gr> - 1.6.1-3
- Bump release.

* Wed Dec 21 2005 Sarantis Paskalis <paskalis@di.uoa.gr> - 1.6.1-2
- Add source code documentation as a -doc package (John Mahowald).
- Add Requires: tkinter for SimGUI to work (John Mahowald).
 
* Fri Nov 25 2005 Sarantis Paskalis <paskalis@di.uoa.gr> - 1.6.1-1
- First packaging version for FE.