aurweb/setup.py
Lukas Fleischer d4fe77ac57 Reorganize Git interface scripts
Move the Git interface scripts from git-interface/ to aurweb/git/. Use
setuptools to automatically create wrappers which can be installed using
`python3 setup.py install`. Update the configuration files, the test
suite as well as the INSTALL and README files to reflect these changes.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-10-08 14:25:43 +02:00

27 lines
702 B
Python

import re
from setuptools import setup, find_packages
import sys
version = None
with open('web/lib/version.inc.php', 'r') as f:
for line in f.readlines():
match = re.match(r'^define\("AURWEB_VERSION", "v([0-9.]+)"\);$', line)
if match:
version = match.group(1)
if not version:
sys.stderr.write('error: Failed to parse version file!')
sys.exit(1)
setup(
name="aurweb",
version=version,
packages=find_packages(),
entry_points={
'console_scripts': [
'aurweb-git-auth = aurweb.git.auth:main',
'aurweb-git-serve = aurweb.git.serve:main',
'aurweb-git-update = aurweb.git.update:main',
],
},
)