-include COPYING ChangeLog MANIFEST.in README.txt TODO mk-distr requirements.txt
-recursive-include project *.py
+include docs/genapidocs
+include COPYING ChangeLog MANIFEST.in Makefile TODO mk-distr *.txt
+recursive-include docs Makefile *.py *.rst *.txt *.css *.js *.html *.gif *.png
+recursive-include tests Makefile *.py
--- /dev/null
+
+.PHONY: all
+all:
+ @echo "Nothing to be done for 'all'"
+
+.PHONY: release
+release: tests flake8 html distr
+
+.PHONY: distr
+distr:
+ ./mk-distr
+
+.PHONY: flake8
+flake8:
+ flake8
+
+.PHONY: html
+html:
+ $(MAKE) -C docs html
+
+.PHONY: test
+test:
+ $(MAKE) -C tests
+
+.PHONY: tests
+tests: test
+
+.PHONY: clean
+clean:
+ find . -name '*.py[co]' -type f -delete
--- /dev/null
+/_build/
+/_static/
+/_templates/
+/api/
--- /dev/null
+#! /bin/sh
+
+cd "`dirname $0`"/.. &&
+exec sphinx-apidoc -Me -o docs/api project
git archive --format=tar --prefix=project/ "${1:-HEAD}" |
(cd "$HOME/tmp" && exec tar xf -) &&
+cp -ap docs "$HOME/tmp/project" &&
+
cd "$HOME/tmp/project" &&
+chmod -R u=rwX,go=rX docs &&
+
python setup.py sdist --formats=bztar &&
cd dist && mv project-*.tar.bz2 ../.. && cd ../.. && exec rm -rf project
--- /dev/null
+#! /bin/sh
+
+web="$HOME"/Internet/WWW/htdocs/phdru.name/Software/Python/project/docs
+
+cd "`dirname \"$0\"`"/docs/_build/html &&
+rsync -ahP --del * --exclude=objects.inv "$web" &&
+
+exec chmod -R u=rwX,go=rX "$web"
+--trusted-host phdru.name
+--find-links=http://phdru.name/Software/Python/
+--install-option="--compile"
+
universal = 1
[easy_install]
+find_links = http://phdru.name/Software/Python/
+optimize = 2
+
+[egg_info]
+tag_build =
+tag_date = 0
+tag_svn_revision = 0
[flake8]
-exclude = .git
+exclude = .git,docs/conf.py
+
is_setuptools = False
versionpath = join(abspath(dirname(__file__)), 'project', '__version__.py')
-load_source('m_librarian_version', versionpath)
-from m_librarian_version import __version__
+load_source('project_version', versionpath)
+from project_version import __version__
setup(name='Template project',
version=__version__,
--- /dev/null
+
+.PHONY: all
+all:
+ ./run_all.py
--- /dev/null
+
+import unittest
+
+__all__ = ['TestCase', 'main']
+
+
+class TestCase(unittest.TestCase):
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+
+def main():
+ try:
+ unittest.main(testRunner=unittest.TextTestRunner())
+ except SystemExit, msg:
+ result = msg.args[0]
+ else:
+ result = 0
+ raise SystemExit(result)
--- /dev/null
+#! /usr/bin/env python
+
+
+import os
+import sys
+import subprocess
+
+
+def isexecutable(filename):
+ infile = open(filename, 'r')
+ magic = infile.read(2)
+ infile.close()
+ return magic == "#!"
+
+
+def collect_tests():
+ tests = []
+ for dirpath, dirs, files in os.walk("tests"):
+ tests.extend(
+ [os.path.join(dirpath, filename) for filename in files
+ if filename.startswith("test") and filename.endswith(".py")
+ ])
+ return [test[:-3].replace(os.sep, '.') for test in tests
+ if isexecutable(test)]
+
+
+def main():
+ os.chdir(os.path.join(os.path.dirname(sys.argv[0]), os.pardir))
+ tests = collect_tests()
+
+ os.environ["PYTHONPATH"] = os.curdir
+
+ for test in sorted(tests):
+ print test
+ subprocess.call((sys.executable, '-m', test))
+
+if __name__ == '__main__':
+ main()
--- /dev/null
+#! /usr/bin/env python
+
+
+import unittest
+from tests import main
+
+
+class TestFormat(unittest.TestCase):
+ def test_test(self):
+ self.assertEqual()
+
+
+if __name__ == "__main__":
+ main()
--- /dev/null
+#! /bin/sh
+exec "$HOME"/admin/prog/git-scripts/update