aurweb/setup.py
Lukas Fleischer dc3fd60715 Use setuptools to install Python modules
Instead of using relative imports, add support for installing the config
and db Python modules to a proper location using setuptools. Change all
git-interface scripts to access those modules from the search path.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-29 22:07:06 +02:00

20 lines
468 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(),
)