Skip to content
Browse files

initial structure for djangobaselibrary

  • Loading branch information...
1 parent c4c6f5a commit 664596cfb221d4314be2988e800df109cc80d6b9 @kvbik kvbik committed
Showing with 133 additions and 0 deletions.
  1. +2 −0 debian/README.Debian
  2. +6 −0 debian/changelog
  3. +1 −0 debian/compat
  4. +13 −0 debian/control
  5. +2 −0 debian/copyright
  6. +1 −0 debian/pycompat
  7. +1 −0 debian/pyversions
  8. +9 −0 debian/rules
  9. +1 −0 djangobaselibrary/__init__.py
  10. +1 −0 docs/README
  11. +3 −0 setup.cfg
  12. +32 −0 setup.py
  13. +59 −0 setuptools_entry.py
  14. +2 −0 tests/testbed/__init__.py
View
2 debian/README.Debian
@@ -0,0 +1,2 @@
+centrum-python-djangobaselibrary for debian
+-------------------------------------------
View
6 debian/changelog
@@ -0,0 +1,6 @@
+centrum-python-djangobaselibrary (0.0.0) unstable; urgency=low
+
+ * initial build
+
+ -- Jakub Vysoky <jakub@borka.cz> Fri, 13 Mar 2009 16:37:07 +0100
+
View
1 debian/compat
@@ -0,0 +1 @@
+5
View
13 debian/control
@@ -0,0 +1,13 @@
+Source: centrum-python-djangobaselibrary
+Section: python
+Priority: optional
+Maintainer: Jan Kral <jan.kral@centrumholdings.com>
+Uploaders: Ondrej Kohout <ondrej.kohout@centrumholdings.com>, Roman Sova <roman.sova@centrumholdings.com>, Jakub Vysoky <jakub.vysoky@centrumholdings.com>
+Build-Depends: cdbs (>= 0.4.41), debhelper (>= 5.0.37.2), python-dev, python-support (>= 0.3), python-setuptools
+Standards-Version: 3.7.2
+
+Package: centrum-python-djangobaselibrary
+Architecture: all
+Depends: ${python:Depends}, ${misc:Depends}, python-django, python-docutils, python-simplejson, python-pysqlite2, python-lxml, python-xml
+Description: django base library
+
View
2 debian/copyright
@@ -0,0 +1,2 @@
+bsd
+
View
1 debian/pycompat
@@ -0,0 +1 @@
+2
View
1 debian/pyversions
@@ -0,0 +1 @@
+2.3-
View
9 debian/rules
@@ -0,0 +1,9 @@
+#!/usr/bin/make -f
+# -*- mode: makefile; coding: utf-8 -*-
+
+DEB_PYTHON_SYSTEM=pysupport
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/python-distutils.mk
+
+DEB_AUTO_CLEANUP_RCS := yes
+#DEB_INSTALL_CHANGELOGS_ALL := CHANGE_LOG.txt
View
1 djangobaselibrary/__init__.py
@@ -0,0 +1 @@
+VERSION = (0, 0, 0)
View
1 docs/README
@@ -0,0 +1 @@
+documentation for djangobaselibrary
View
3 setup.cfg
@@ -0,0 +1,3 @@
+[egg_info]
+tag_build = dev
+;tag_svn_revision = true
View
32 setup.py
@@ -0,0 +1,32 @@
+from setuptools import setup, find_packages
+import djangobaselibrary
+
+version = "%d.%d.%d" % djangobaselibrary.VERSION
+
+setup(
+ name = 'djangobaselibrary',
+ version = version,
+ description = 'django base library',
+ long_description = '\n'.join((
+ 'django base library',
+ 'template for other libs',
+ )),
+ author = 'centrum holdings s.r.o',
+ license = 'BSD',
+
+ packages = find_packages(
+ where = '.',
+ exclude = ('docs', 'tests')
+ ),
+
+ include_package_data = True,
+
+ entry_points={
+ 'setuptools.file_finders': ['dummy = setuptools_entry:dummylsfiles'],
+ },
+
+ install_requires = [
+ 'setuptools>=0.6b1',
+ ],
+)
+
View
59 setuptools_entry.py
@@ -0,0 +1,59 @@
+#!/usr/bin/env python
+
+"""
+A hook into setuptools for files not under VCS.
+
+based on setuptools_git
+"""
+
+import re
+import os
+from os.path import join
+
+# do not include /build/ dir, *.egg-info dir and py[co] files
+EXCLUDE = re.compile(r'(^build|[^/]+\.egg-info|.*.py[co]$)')
+
+def walk(top):
+ files = []
+
+ def _walk(top, dir):
+ try:
+ names = os.listdir(top)
+ except os.error:
+ return
+
+ for name in names:
+ _name = join(dir, name)
+ _top = join(top, name)
+ if os.path.isdir(_top):
+ _walk(_top, _name)
+ else:
+ files.append(_name)
+
+ _walk(top, '')
+ return files
+
+def dummylsfiles(dirname=""):
+ if not dirname:
+ dirname = '.'
+
+ try:
+ files = walk(dirname)
+ except:
+ # Something went terribly wrong but the setuptools doc says we
+ # must be strong in the face of danger. We shall not run away
+ # in panic.
+ return []
+
+ return [f for f in files if not EXCLUDE.match(f)]
+
+if __name__ == "__main__":
+ import sys
+ from pprint import pprint
+
+ if len(sys.argv) != 2:
+ print "USAGE: %s DIRNAME" % sys.argv[0]
+ sys.exit(1)
+
+ pprint(dummylsfiles(sys.argv[1]))
+
View
2 tests/testbed/__init__.py
@@ -0,0 +1,2 @@
+# placeholder for some example project
+# or unittests

0 comments on commit 664596c

Please sign in to comment.
Something went wrong with that request. Please try again.