Skip to content
Commits on Source (8)
#!/bin/sh
mkdir -p ~/.cain
python /usr/share/cain/Cain.py
python3 /usr/share/cain/Cain.py
......@@ -8,6 +8,11 @@ cain (1.10+dfsg-4) UNRELEASED; urgency=medium
* Build-Depends: dh-python
* Use 2to3 to port to Python3
Closes: #936261
* debhelper-compat 12
* Standards-Version: 4.4.0
* Respect DEB_BUILD_OPTIONS in override_dh_auto_test target
* Do not parse d/changelog
* Use secure URI in debian/watch.
-- Andreas Tille <tille@debian.org> Tue, 10 Sep 2019 20:29:13 +0200
......
......@@ -4,28 +4,28 @@ Uploaders: Ivo Maintz <ivo@maintz.de>,
Andreas Tille <tille@debian.org>
Section: science
Priority: optional
Build-Depends: debhelper (>= 11~),
Build-Depends: debhelper-compat (= 12),
dh-python,
python-all-dev,
python (<< 3.0),
python3-all-dev,
python3,
libeigen3-dev,
zip
Standards-Version: 4.1.5
Standards-Version: 4.4.0
Vcs-Browser: https://salsa.debian.org/med-team/cain
Vcs-Git: https://salsa.debian.org/med-team/cain.git
Homepage: http://cain.sourceforge.net
Package: cain
Architecture: all
Depends: ${python:Depends},
Depends: ${python3:Depends},
${shlibs:Depends},
${misc:Depends},
python (<< 3.0),
python-wxgtk3.0,
python-matplotlib,
python-numpy,
python-scipy,
python-sympy,
python3,
python3-wxgtk4.0,
python3-matplotlib,
python3-numpy,
python3-scipy,
python3-sympy,
cain-solvers
Recommends: cain-examples
Description: simulations of chemical reactions
......@@ -36,7 +36,7 @@ Description: simulations of chemical reactions
exported. The models and methods can be read from input files or edited
within the program.
.
The GUI (Graphical User Interface) is written in Python and uses the wxPython
The GUI (Graphical User Interface) is written in Python3 and uses the wxPython
toolkit. Most of the solvers are implemented as command line executables,
written in C++, which are driven by Cain. This makes it easy to launch batch
jobs. It also simplifies the process of adding new solvers. Cain offers a
......@@ -63,7 +63,7 @@ Description: solvers for cain
exported. The models and methods can be read from input files or edited
within the program.
.
The GUI (Graphical User Interface) is written in Python and uses the wxPython
The GUI (Graphical User Interface) is written in Python3 and uses the wxPython
toolkit. Most of the solvers are implemented as command line executables,
written in C++, which are driven by Cain. This makes it easy to launch batch
jobs. It also simplifies the process of adding new solvers. Cain offers a
......@@ -90,7 +90,7 @@ Description: examples for cain
exported. The models and methods can be read from input files or edited
within the program.
.
The GUI (Graphical User Interface) is written in Python and uses the wxPython
The GUI (Graphical User Interface) is written in Python3 and uses the wxPython
toolkit. Most of the solvers are implemented as command line executables,
written in C++, which are driven by Cain. This makes it easy to launch batch
jobs. It also simplifies the process of adding new solvers. Cain offers a
......
......@@ -5,7 +5,13 @@ Last-Update: Tue, 10 Sep 2019 20:29:13 +0200
--- a/Cain.py
+++ b/Cain.py
@@ -32,24 +32,24 @@ def main():
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#!/usr/bin/python3
"""The script that launches Cain."""
@@ -32,15 +32,15 @@ def main():
errors.append('Consult the documentation available at http://cain.sourceforge.net/.')
hasTk = True
try:
......@@ -24,10 +30,8 @@ Last-Update: Tue, 10 Sep 2019 20:29:13 +0200
+ tkinter.messagebox.showwarning('Error', '\n'.join(errors))
root.mainloop()
else:
- print('\n'.join(errors))
+ print(('\n'.join(errors)))
sys.exit(1)
print('\n'.join(errors))
@@ -49,7 +49,7 @@ def main():
# Launch the application.
from gui.Application import Application
if len(sys.argv) > 2:
......@@ -602,7 +606,12 @@ Last-Update: Tue, 10 Sep 2019 20:29:13 +0200
main()
--- a/fio/SbmlReader.py
+++ b/fio/SbmlReader.py
@@ -17,15 +17,15 @@ def readSbmlFile(fileName):
@@ -1,3 +1,4 @@
+#!/usr/bin/python3
"""SBML reader.
This code is currently not used. I cannot get libsbml and wxPython to work
together. Thus I wrote my own SBML parser in ContentHandlerSbml."""
@@ -17,15 +18,15 @@ def readSbmlFile(fileName):
# Create an empty model.
model = Model()
# Read the SBML file.
......@@ -621,14 +630,14 @@ Last-Update: Tue, 10 Sep 2019 20:29:13 +0200
#sbmlModel = document.getModel()
sbmlModel = libsbml.SBMLReader().readSBML(fileName).getModel()
# Model identifier.
@@ -77,8 +77,8 @@ def readSbmlFile(fileName):
@@ -77,8 +78,8 @@ def readSbmlFile(fileName):
if __name__ == '__main__':
if (len(sys.argv) != 2):
- print 'Usage:'
- print 'python SbmlReader.py file.xml'
+ print('Usage:')
+ print('python SbmlReader.py file.xml')
+ print('python3 SbmlReader.py file.xml')
raise 'Bad command line arguments.'
- print sys.argv[1]
+ print(sys.argv[1])
......@@ -2532,3 +2541,26 @@ Last-Update: Tue, 10 Sep 2019 20:29:13 +0200
if not 'expression' in keys:
return 'Missing expression attribute in parameter or compartment.\n'
self.expression = attributes['expression']
--- a/gui/Application.py
+++ b/gui/Application.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#!/usr/bin/python3
"""The script that launches Cain."""
--- a/fio/SbmlLevel1To2.py
+++ b/fio/SbmlLevel1To2.py
@@ -1,10 +1,11 @@
+#!/usr/bin/python3
"""SbmlLevel1To2.py."""
import sys, re
if len(sys.argv) != 3:
print("""Usage:
-python SbmlLevel1To2.py input.xml output.xml
+python3 SbmlLevel1To2.py input.xml output.xml
Bad command line arguments. Exiting...""")
sys.exit()
......@@ -6,13 +6,13 @@ SRC_TMP=$(CURDIR)/SRC_TMP
debtmp := $(CURDIR)/debian/tmp
include /usr/share/dpkg/default.mk
BUILD_DATE := $(shell dpkg-parsechangelog | grep Date: | cut -d' ' -f2-7)
BUILD_DATE := $(shell TZ=UTC LC_ALL=C date --date="@$(SOURCE_DATE_EPOCH)" +'%b %d %Y')
export TZ=UTC
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
%:
dh $@ --with python2
dh $@ --with python3
override_dh_auto_clean:
dh_auto_clean
......@@ -37,4 +37,6 @@ override_dh_install-indep:
fi
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
echo "no tests implemented"
endif
version=3
opts="repacksuffix=+dfsg,dversionmangle=s/\+dfsg//g,uversionmangle=s/_/./" \
http://sf.net/cain/[cC]ain-(\d[\d\._]+)\.(?:tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz))|zip)
https://sf.net/cain/[cC]ain-(\d[\d\._]+)\.(?:tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz))|zip)