Franck Pommereau

dropped .deb package build

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