mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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>
20 lines
468 B
Python
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(),
|
|
)
|