[med-svn] [Git][med-team/cain][master] 8 commits: fix command interpreter
Andreas Tille
gitlab at salsa.debian.org
Tue Sep 10 20:23:36 BST 2019
Andreas Tille pushed to branch master at Debian Med / cain
Commits:
f833ab0a by Andreas Tille at 2019-09-10T18:32:26Z
fix command interpreter
- - - - -
edd90c81 by Andreas Tille at 2019-09-10T19:09:37Z
Change some python calls to python3
- - - - -
c894489f by Andreas Tille at 2019-09-10T19:12:05Z
Switch packaging to Python3
- - - - -
04155eb4 by Andreas Tille at 2019-09-10T19:12:31Z
debhelper-compat 12
- - - - -
0965ed4e by Andreas Tille at 2019-09-10T19:12:36Z
Standards-Version: 4.4.0
- - - - -
f0909d55 by Andreas Tille at 2019-09-10T19:13:41Z
Respect DEB_BUILD_OPTIONS in override_dh_auto_test target
- - - - -
e48e2f5a by Andreas Tille at 2019-09-10T19:16:29Z
Do not parse d/changelog
- - - - -
f03f859f by Andreas Tille at 2019-09-10T19:16:34Z
Use secure URI in debian/watch.
Fixes lintian: debian-watch-uses-insecure-uri
See https://lintian.debian.org/tags/debian-watch-uses-insecure-uri.html for more details.
- - - - -
7 changed files:
- debian/bin/cain
- debian/changelog
- − debian/compat
- debian/control
- debian/patches/2to3.patch
- debian/rules
- debian/watch
Changes:
=====================================
debian/bin/cain
=====================================
@@ -1,3 +1,3 @@
#!/bin/sh
mkdir -p ~/.cain
-python /usr/share/cain/Cain.py
+python3 /usr/share/cain/Cain.py
=====================================
debian/changelog
=====================================
@@ -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 at debian.org> Tue, 10 Sep 2019 20:29:13 +0200
=====================================
debian/compat deleted
=====================================
@@ -1 +0,0 @@
-11
=====================================
debian/control
=====================================
@@ -4,28 +4,28 @@ Uploaders: Ivo Maintz <ivo at maintz.de>,
Andreas Tille <tille at 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
=====================================
debian/patches/2to3.patch
=====================================
@@ -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()
+
=====================================
debian/rules
=====================================
@@ -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
=====================================
debian/watch
=====================================
@@ -1,3 +1,3 @@
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)
View it on GitLab: https://salsa.debian.org/med-team/cain/compare/865be57670405da56a8d8a1f4f7de61873519eea...f03f859fea2185932c93622916228251db6388f5
--
View it on GitLab: https://salsa.debian.org/med-team/cain/compare/865be57670405da56a8d8a1f4f7de61873519eea...f03f859fea2185932c93622916228251db6388f5
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20190910/23a2da3f/attachment-0001.html>
More information about the debian-med-commit
mailing list