[python-pysb] python-pysb-0.1.11-2

Zbigniew Jędrzejewski-Szmek zbyszek at fedoraproject.org
Fri Dec 5 17:55:34 UTC 2014


commit 88d6f7592526d64b7dc7bf0df6fba9d68c400b52
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Wed Dec 3 23:26:49 2014 -0500

    python-pysb-0.1.11-2

 ...torial_a-executable-same-as-other-example.patch |   26 ++++++++++++++++++++
 python-pysb.spec                                   |   10 +++++++-
 2 files changed, 35 insertions(+), 1 deletions(-)
---
diff --git a/0001-Mark-run_tutorial_a-executable-same-as-other-example.patch b/0001-Mark-run_tutorial_a-executable-same-as-other-example.patch
new file mode 100644
index 0000000..abae2e5
--- /dev/null
+++ b/0001-Mark-run_tutorial_a-executable-same-as-other-example.patch
@@ -0,0 +1,26 @@
+From 8d9074d8182a2883525ef024e66917a4de7f7894 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek at in.waw.pl>
+Date: Wed, 3 Dec 2014 23:18:57 -0500
+Subject: [PATCH] Mark run_tutorial_a executable same as other examples
+
+---
+ pysb/examples/run_tutorial_a.py | 3 +++
+ 1 file changed, 3 insertions(+)
+ mode change 100644 => 100755 pysb/examples/run_tutorial_a.py
+
+diff --git a/pysb/examples/run_tutorial_a.py b/pysb/examples/run_tutorial_a.py
+old mode 100644
+new mode 100755
+index b3f11906c4..e3b83ca151
+--- a/pysb/examples/run_tutorial_a.py
++++ b/pysb/examples/run_tutorial_a.py
+@@ -1,3 +1,6 @@
++#!/usr/bin/env python
++"""Run the first example in the tutorial and print the results."""
++
+ from pysb.integrate import Solver
+ from tutorial_a import model
+ 
+-- 
+1.9.3
+
diff --git a/python-pysb.spec b/python-pysb.spec
index 1175e0b..66c9933 100644
--- a/python-pysb.spec
+++ b/python-pysb.spec
@@ -1,6 +1,6 @@
 Name:           python-pysb
 Version:        0.1.11
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Rule-based modeling of biochemical systems as Python programs
 License:        BSD
 URL:            http://pysb.org/
@@ -19,6 +19,7 @@ Requires:       scipy
 Requires:       python-matplotlib
 Requires:       sympy
 Requires:       python-pygraphviz
+Patch0:         0001-Mark-run_tutorial_a-executable-same-as-other-example.patch
 
 %description
 PySB is a framework for building mathematical models of biochemical
@@ -45,10 +46,12 @@ This package contains the HTML documentation for %{name}.
 
 %prep
 %setup -q -n pysb-%{version}
+%patch0 -p1
 # https://github.com/pysb/pysb/issues/100
 sed -i -e "s|/usr/local/share/BioNetGen|%{perl_vendorlib}/BioNetGen|" \
        -e "s|'c:/Program Files/BioNetGen',||" \
     pysb/bng.py
+sed -i -s "1 s|/usr/bin/env python|%{__python2}|" pysb/examples/*.py pysb/tools/*.py
 
 %build
 python setup.py build
@@ -61,6 +64,8 @@ python build.py
 
 %install
 python2 setup.py install --skip-build --root %{buildroot}
+chmod +x %{buildroot}/%{python_sitelib}/pysb/examples/run_*.py
+chmod +x %{buildroot}/%{python_sitelib}/pysb/tools/[a-z]*.py
 
 %files
 %license LICENSE.txt
@@ -75,5 +80,8 @@ python2 setup.py install --skip-build --root %{buildroot}
 %endif
 
 %changelog
+* Wed Dec 03 2014 Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl> - 0.1.11-2
+- Fix shebangs and permissions on scripts.
+
 * Fri Nov 21 2014 Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl> - 0.1.11-1
 - Initial packaging.


More information about the scm-commits mailing list