chiark / gitweb /
wip packaging
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 8 Apr 2017 18:04:14 +0000 (19:04 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 8 Apr 2017 18:04:14 +0000 (19:04 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
.gitignore
debian/changelog [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/pkg.install [new file with mode: 0644]
debian/rules [new file with mode: 0755]
setup.py [new file with mode: 0755]

index fd964701c3dc09acbd55a8e0ee8d4c9bd90dab2d..4f7644d56b842fec7b686863e926f210a10c208e 100644 (file)
@@ -3,3 +3,14 @@ data.dump.dbg
 tmp
 srcbomb.tar.gz
 srcpkgsbomb.tar
+
+.pybuild
+hippotat.egg-info
+
+debian/files
+debian/debhelper-*-stamp
+debian/*.debhelper.log
+debian/hippotat.substvars
+debian/hippotat.*.debhelper
+
+debian/hippotat/
diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..298792c
--- /dev/null
@@ -0,0 +1,6 @@
+hippotat (0.1~UNRELEASED) unstable; urgency=medium
+
+  * 
+
+ -- Ian Jackson <ijackson@chiark.greenend.org.uk>  Sat, 08 Apr 2017 17:57:42 +0100
+
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..ec63514
--- /dev/null
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..13247e4
--- /dev/null
@@ -0,0 +1,9 @@
+Source: hippotat
+Build-Depends: dh-python, python3
+Maintainer: Ian Jackson <ijackson@chiark.greenend.org.uk>
+
+Package: hippotat
+Depends: python3, ${python3:Depends}
+Architecture: all
+Description: Asinine IP Over HTTP
+ tbd
diff --git a/debian/pkg.install b/debian/pkg.install
new file mode 100644 (file)
index 0000000..51a1828
--- /dev/null
@@ -0,0 +1 @@
+hippotatlib/*.py
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..d087b53
--- /dev/null
@@ -0,0 +1,6 @@
+#!/usr/bin/make -f
+
+export PYBUILD_INSTALL_DIR=/usr/share/hippotat/python3
+
+%:
+       dh $@ --with python3 --buildsystem=pybuild
diff --git a/setup.py b/setup.py
new file mode 100755 (executable)
index 0000000..60c5c5d
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,33 @@
+#!/usr/bin/python3
+
+from setuptools import setup, find_packages
+
+import re as regexp
+import glob
+import sys
+
+scripts = ['hippotat','hippotatd']
+scan = scripts + glob.glob('hippotatlib/*.py')
+
+def find_requires():
+  mod_pat = r'[._0-9a-zA-Z]+'
+  res = list(map(regexp.compile,
+                 [r'from\s+('+mod_pat+r')\s+import\b',
+                  r'import\s+('+mod_pat+r')\s']))
+  reqs = { }
+  for scanf in scan:
+    print('scanning %s' % scanf, file=sys.stderr)
+    for l in open(scanf):
+      for re in res:
+        m = re.match(l)
+        if m is not None:
+          reqs[m.group(1)] = True
+          break
+  print(repr(reqs), file=sys.stderr)
+  return list(reqs.keys())
+
+setup(
+  name="hippotat",
+  packages=find_packages(),
+  requires=find_requires()
+)