gitosis/setup.py
Tommi Virtanen 8a0654abe2 Refactor command line utilities to share setup.
Hide internal gitosis-ssh and gitosis-gitweb, it's all in gitosis-run-hook.
2007-09-03 17:09:12 -07:00

45 lines
1.4 KiB
Python
Executable file

#!/usr/bin/python
from setuptools import setup, find_packages
import os
def _subdir_contents(path):
for toplevel in os.listdir(path):
toplevel_path = os.path.join(path, toplevel)
if not os.path.isdir(toplevel_path):
continue
for dirpath, dirnames, filenames in os.walk(toplevel_path):
for filename in filenames:
full_path = os.path.join(dirpath, filename)
if not full_path.startswith(path+'/'):
raise RuntimeError()
yield full_path[len(path)+1:]
def subdir_contents(path):
return list(_subdir_contents(path))
setup(
name = "gitosis",
version = "0.1",
packages = find_packages(),
author = "Tommi Virtanen",
author_email = "tv@eagain.net",
description = "software for hosting git repositories",
license = "GPL",
keywords = "git scm version-control ssh",
url = "http://eagain.net/software/gitosis/",
entry_points = {
'console_scripts': [
'gitosis-serve = gitosis.serve:Main.run',
'gitosis-run-hook = gitosis.run_hook:Main.run',
'gitosis-init = gitosis.init:Main.run',
],
},
package_data = {
# this seems to be the only way to convince setuptools
# to include things recursively
'gitosis.templates': subdir_contents('gitosis/templates'),
},
)