Franck Pommereau

dropped .deb package build

1 all: 1 all:
2 @echo "Commands:" 2 @echo "Commands:"
3 - @echo " release prepare source for release"
4 - @echo " tgz build a source tarball"
5 - @echo " dput build and upload Ubuntu packages"
6 @echo " clean delete some garbage files" 3 @echo " clean delete some garbage files"
4 + @echo " nextver increments version number"
7 @echo " test run tests through supported Python implementations" 5 @echo " test run tests through supported Python implementations"
8 - @echo " next-deb increments debian/VERSION"
9 - @echo " next-ppa increments debian/PPA"
10 @echo " lang build generated files in snakes/lang" 6 @echo " lang build generated files in snakes/lang"
11 @echo " emacs compile Emacs files" 7 @echo " emacs compile Emacs files"
12 @echo " pip upload to PyPI" 8 @echo " pip upload to PyPI"
13 9
14 -committed: 10 +nextver:
15 - hg summary|grep -q '^commit: (clean)$$' 11 + python version.py next
16 12
17 -pip: utils/abcd-mode.el 13 +version:
14 + python version.py check
15 +
16 +pip: emacs version
18 python setup.py sdist upload 17 python setup.py sdist upload
19 18
20 -next-deb: 19 +emacs: utils/abcd-mode.elc
21 - echo 1 > debian/PPA
22 - echo $$((1+$$(cat debian/VERSION))) > debian/VERSION
23 20
24 utils/abcd-mode.elc: utils/abcd-mode.el 21 utils/abcd-mode.elc: utils/abcd-mode.el
25 emacs -batch -f batch-byte-compile utils/abcd-mode.el 22 emacs -batch -f batch-byte-compile utils/abcd-mode.el
26 23
27 -next-ppa:
28 - echo $$((1+$$(cat debian/PPA))) > debian/PPA
29 -
30 -release: committed tgz
31 - hg tag version-$$(cat VERSION)
32 - echo 1 > debian/PPA
33 - echo 1 > debian/VERSION
34 - hg commit -m "version $$(cat VERSION)"
35 - hg push
36 -
37 lang: 24 lang:
38 python mklang.py 25 python mklang.py
39 26
40 -tgz: committed
41 - hg archive snakes-$$(cat VERSION)-$$(cat debian/VERSION)
42 - tar cf snakes-$$(cat VERSION)-$$(cat debian/VERSION).tar snakes-$$(cat VERSION)-$$(cat debian/VERSION)
43 - rm -rf snakes-$$(cat VERSION)-$$(cat debian/VERSION)
44 - gzip -9 snakes-$$(cat VERSION)-$$(cat debian/VERSION).tar
45 - gpg --armor --sign --detach-sig snakes-$$(cat VERSION)-$$(cat debian/VERSION).tar.gz
46 -
47 -dput.sh: VERSION debian/*
48 - python mkdeb.py
49 -
50 -dput: committed dput.sh
51 - sh dput.sh
52 -
53 clean: 27 clean:
54 rm -f $$(find . -name ",*") 28 rm -f $$(find . -name ",*")
55 rm -f $$(find . -name "*.pyc") 29 rm -f $$(find . -name "*.pyc")
...@@ -59,11 +33,8 @@ clean: ...@@ -59,11 +33,8 @@ clean:
59 33
60 test: 34 test:
61 python2.5 test.py 35 python2.5 test.py
62 - python2.6 test.py
63 python2.7 test.py 36 python2.7 test.py
64 python3 test.py 37 python3 test.py
65 unladen test.py 38 unladen test.py
66 pypy test.py 39 pypy test.py
67 - spypy test.py
68 - stackless test.py
69 jython test.py 40 jython test.py
......
1 -precise 12.04 LTS
1 -python-snakes (0.9.17-1) UNRELEASED; urgency=low
2 -
3 - * see NEWS
4 -
5 - -- Franck Pommereau <pommereau@univ-paris12.fr> Wed, 10 Apr 2013 13:57:29 +0200
6 -
7 -python-snakes (0.9.16-1) UNRELEASED; urgency=low
8 -
9 - * see NEWS
10 -
11 - -- Franck Pommereau <pommereau@univ-paris12.fr> Tue, 07 Jun 2011 12:23:33 +0200
12 -
13 -python-snakes (0.9.15-1) UNRELEASED; urgency=low
14 -
15 - * see NEWS
16 -
17 - -- Franck Pommereau <pommereau@univ-paris12.fr> Tue, 10 May 2011 18:22:34 +0200
18 -
19 -python-snakes (0.9.14-1) UNRELEASED; urgency=low
20 -
21 - * see NEWS
22 -
23 - -- Franck Pommereau <pommereau@univ-paris12.fr> Mon, 11 Apr 2011 16:45:50 +0200
24 -
25 -python-snakes (0.9.13-2) UNRELEASED; urgency=low
26 -
27 - * see NEWS
28 -
29 - -- Franck Pommereau <pommereau@univ-paris12.fr> Fri, 23 Jul 2010 20:06:53 +0200
30 -
31 -python-snakes (0.9.13-1) UNRELEASED; urgency=low
32 -
33 - * see NEWS
34 -
35 - -- Franck Pommereau <pommereau@univ-paris12.fr> Fri, 16 Jul 2010 17:09:14 +0200
36 -
37 -python-snakes (0.9.12-2) UNRELEASED; urgency=low
38 -
39 - * see NEWS
40 -
41 - -- Franck Pommereau <pommereau@univ-paris12.fr> Sat, 03 Apr 2010 21:06:50 +0200
42 -
43 -python-snakes (0.9.12-1) UNRELEASED; urgency=low
44 -
45 - * see NEWS
46 -
47 - -- Franck Pommereau <pommereau@univ-paris12.fr> Thu, 01 Apr 2010 19:46:02 +0200
48 -
49 -python-snakes (0.9.11-1) UNRELEASED; urgency=low
50 -
51 - * see NEWS
52 -
53 - -- Franck Pommereau <pommereau@univ-paris12.fr> Thu, 25 Mar 2010 19:39:47 +0100
54 -
55 -python-snakes (0.9.10-1) UNRELEASED; urgency=low
56 -
57 - * see NEWS
58 -
59 - -- Franck Pommereau <pommereau@univ-paris12.fr> Fri, 19 Jun 2009 13:40:36 +0200
60 -
61 -python-snakes (0.9.9-2) UNRELEASED; urgency=low
62 -
63 - * see NEWS
64 -
65 - -- Franck Pommereau <pommereau@univ-paris12.fr> Tue, 19 May 2009 09:29:46 +0200
66 -
67 -python-snakes (0.9.8-2) UNRELEASED; urgency=low
68 -
69 - * see NEWS
70 -
71 - -- Franck Pommereau <pommereau@univ-paris12.fr> Tue, 14 Apr 2009 20:02:32 +0200
72 -
73 -python-snakes (0.9.8-1) UNRELEASED; urgency=low
74 -
75 - * see NEWS
76 -
77 - -- Franck Pommereau <pommereau@univ-paris12.fr> Mon, 23 Mar 2009 17:34:06 +0100
78 -
79 -python-snakes (0.9.7-1) UNRELEASED; urgency=low
80 -
81 - * see NEWS
82 -
83 - -- Franck Pommereau <pommereau@univ-paris12.fr> Tue, 20 Jan 2009 13:07:09 +0100
84 -
85 -python-snakes (0.9.6-2) UNRELEASED; urgency=low
86 -
87 - * see NEWS
88 -
89 - -- Franck Pommereau <pommereau@univ-paris12.fr> Tue, 02 Dec 2008 17:47:43 +0100
90 -
91 -python-snakes (0.9.6-1) UNRELEASED; urgency=low
92 -
93 - * see NEWS
94 -
95 - -- Franck Pommereau <pommereau@univ-paris12.fr> Fri, 28 Nov 2008 15:24:05 +0100
96 -
97 -python-snakes (0.9.5-2) UNRELEASED; urgency=low
98 -
99 - * Fixed doc installation path
100 -
101 - -- Franck Pommereau <pommereau@univ-paris12.fr> Fri, 21 Nov 2008 13:20:55 +0100
102 -
103 -python-snakes (0.9.5-1) UNRELEASED; urgency=low
104 -
105 - * Trying to fix build on Launchpad
106 -
107 - -- Franck Pommereau <pommereau@univ-paris12.fr> Fri, 21 Nov 2008 08:19:04 +0100
108 -
109 -python-snakes (0.9.5) UNRELEASED; urgency=low
110 -
111 - * See NEWS
112 -
113 - -- Franck Pommereau <pommereau@univ-paris12.fr> Wed, 19 Nov 2008 21:47:52 +0100
114 -
115 -python-snakes (0.9.4) UNRELEASED; urgency=low
116 -
117 - * Initial release. (Closes: #XXXXXX)
118 -
119 - -- Franck Pommereau <pommereau@univ-paris12.fr> Tue, 18 Nov 2008 12:09:16 +0100
1 -Source: python-snakes
2 -Section: python
3 -Priority: extra
4 -Maintainer: Franck Pommereau <pommereau@univ-paris12.fr>
5 -Homepage: http://lacl.univ-paris12.fr/pommereau/soft/snakes
6 -Build-Depends: python (>=2.5), cdbs (>=0.4.49), debhelper (>= 5), python-central (>=0.5.6)
7 -XS-Python-Version: >=2.5
8 -Standards-Version: 3.7.2
9 -
10 -Package: python-snakes
11 -Architecture: all
12 -XB-Python-Version: ${python:Versions}
13 -Depends: python (>=2.5), python-central, graphviz, python-tk
14 -Description: SNAKES is the Net Algebra Kit for Editors and Simulators
15 - SNAKES is a general purpose Petri net Python library allowing to
16 - define and execute most classes of Petri nets. It features a plugin
17 - system to allow its extension. In particular, plugins are provided to
18 - implement the operations usually found in the PBC and M-nets family.
1 -This package was debianized by Franck Pommereau <pommereau@univ-paris12.fr> on
2 -DATE
3 -
4 -License:
5 -
6 - This package is free software; you can redistribute it and/or
7 - modify it under the terms of the GNU Lesser General Public License
8 - as published by the Free Software Foundation; either version 2 of
9 - the License, or (at your option) any later version.
10 -
11 - This package is distributed in the hope that it will be useful, but
12 - WITHOUT ANY WARRANTY; without even the implied warranty of
13 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 - Lesser General Public License for more details.
15 -
16 - You should have received a copy of the GNU Lesser General Public
17 - License along with this package; if not, see
18 - `http://www.gnu.org/licenses/lgpl-3.0.txt'.
19 -
20 -On Debian systems, the complete text of the GNU General
21 -Public License can be found in `/usr/share/common-licenses/LGPL'.
22 -
23 -The Debian packaging is (C) 2008, Franck Pommereau
24 -<pommereau@univ-paris12.fr> and is licensed under the LGPL, see above.
1 -#!/usr/bin/make -f
2 -
3 -DEB_PYTHON_SYSTEM=pycentral
4 -
5 -include /usr/share/cdbs/1/rules/debhelper.mk
6 -include /usr/share/cdbs/1/class/python-distutils.mk
1 -import os, os.path
2 -
3 -snakes_version = open("VERSION").readline().strip()
4 -package_version = open("debian/VERSION").readline().strip()
5 -ppa_version = open("debian/PPA").readline().strip()
6 -changelog_version = open("debian/changelog").readline().split()[1].strip("()")
7 -distribs = [l.strip().split()[0] for l in open("debian/DISTRIB")]
8 -base_dir = os.getcwd()
9 -base_dist_dir = "dist"
10 -dput_sh = open("dput.sh", "w")
11 -
12 -def system (command) :
13 - print("*** %s" % command)
14 - retcode = os.system(command)
15 - if retcode != 0 :
16 - print("*** error return status (%s)" % retcode)
17 - sys.exit(retcode)
18 -
19 -def chdir (path) :
20 - print("*** cd %s" % path)
21 - os.chdir(path)
22 -
23 -def changelog (path, dist) :
24 - full_version = "%s-%s~ppa%s~%s1" % (snakes_version, package_version,
25 - ppa_version, dist)
26 - chdir(path)
27 - system("debchange -b --newversion %s --distribution %s 'see NEWS'"
28 - % (full_version, dist))
29 - chdir(base_dir)
30 -
31 -def build_package (dist_dir, dist) :
32 - full_version = "%s-%s~ppa%s~%s1" % (snakes_version, package_version,
33 - ppa_version, dist)
34 - deb_dir = os.path.join(dist_dir, "python-snakes_%s" % full_version)
35 - if not os.path.isdir(dist_dir) :
36 - print("*** make dir %r" % dist_dir)
37 - os.makedirs(dist_dir)
38 - if os.path.isdir(deb_dir) :
39 - system("rm -rf %s" % deb_dir)
40 - system("hg archive %s" % deb_dir)
41 - changelog(deb_dir, dist)
42 - system("sed -i -e 's/DATE/$(date -R)/' %s/debian/copyright" % deb_dir)
43 - system("sed -i -e 's/UNRELEASED/%s/' %s/debian/changelog" % (dist, deb_dir))
44 - chdir(deb_dir)
45 - system("make doc")
46 - system("dpkg-buildpackage")
47 - system("dpkg-buildpackage -S -sa")
48 - chdir(base_dir)
49 - dput_sh.write("dput lp %s_source.changes\n" % deb_dir)
50 -
51 -main_version = "%s-%s" % (snakes_version, package_version)
52 -if main_version != changelog_version :
53 - system("debchange --newversion %s --distribution UNRELEASED 'see NEWS'"
54 - % main_version)
55 - system("hg commit -m 'updated debian/changelog' debian/changelog")
56 -
57 -for dist in distribs :
58 - build_package(base_dist_dir, dist)
59 -dput_sh.close()
1 +import sys, os
2 +sys.path.insert(0, ".")
3 +import snakes
4 +
5 +def check () :
6 + VERSION = open("VERSION").read().strip()
7 + if VERSION == snakes.version :
8 + sys.exit(0)
9 + else :
10 + print("VERSION=%s / snakes.version=%s" % (VERSION, snakes.version))
11 + sys.exit(1)
12 +
13 +def next () :
14 + old = snakes.version
15 + ver = [int(v) for v in old.split(".")]
16 + ver[-1] += 1
17 + new = ".".join(str(v) for v in ver)
18 + with open("VERSION", "w") as out :
19 + out.write("%s\n" % new)
20 + os.system("sed -i.bak 's/%s/%s/' snakes/__init__.py" % (old, new))
21 +
22 +if __name__ == "__main__" :
23 + if sys.argv[1:] == ["check"] :
24 + check()
25 + elif sys.argv[1:] == ["next"] :
26 + next()
27 + else :
28 + print("usage: python version.py [check|next]")
29 + sys.exit(255)