Fix: typos in clone commands were creating empty repos
[gitosis.git] / setup.py
1 #!/usr/bin/python
2 from setuptools import setup, find_packages
3 import os
4
5 def _subdir_contents(path):
6     for toplevel in os.listdir(path):
7         toplevel_path = os.path.join(path, toplevel)
8         if not os.path.isdir(toplevel_path):
9             continue
10         for dirpath, dirnames, filenames in os.walk(toplevel_path):
11             for filename in filenames:
12                 full_path = os.path.join(dirpath, filename)
13                 if not full_path.startswith(path+'/'):
14                     raise RuntimeError()
15                 yield full_path[len(path)+1:]
16 def subdir_contents(path):
17     return list(_subdir_contents(path))
18
19 setup(
20     name = "gitosis",
21     version = "0.2",
22     packages = find_packages(),
23
24     author = "Tommi Virtanen",
25     author_email = "tv@eagain.net",
26     description = "software for hosting git repositories",
27     long_description = """
28
29 Manage git repositories, provide access to them over SSH, with tight
30 access control and not needing shell accounts.
31
32 gitosis aims to make hosting git repos easier and safer. It manages
33 multiple repositories under one user account, using SSH keys to
34 identify users. End users do not need shell accounts on the server,
35 they will talk to one shared account that will not let them run
36 arbitrary commands.
37
38 """.strip(),
39     license = "GPL",
40     keywords = "git scm version-control ssh",
41     url = "http://eagain.net/software/gitosis/",
42
43     entry_points = {
44         'console_scripts': [
45             'gitosis-serve = gitosis.serve:Main.run',
46             'gitosis-run-hook = gitosis.run_hook:Main.run',
47             'gitosis-init = gitosis.init:Main.run',
48             ],
49         },
50
51     package_data = {
52         # this seems to be the only way to convince setuptools
53         # to include things recursively
54         'gitosis.templates': subdir_contents('gitosis/templates'),
55     },
56
57     # templates need to be a real directory, for git init
58     zip_safe=False,
59
60     install_requires=[
61         # setuptools 0.6a9 will have a non-executeable post-update
62         # hook, this will make gitosis-admin settings not update
63         # (fixed in 0.6c5, maybe earlier)
64         'setuptools>=0.6c5',
65         ],
66     )
67