aurweb/setup.py
Lukas Fleischer ce93360257 Erase login IP addresses after seven days
Add a script to periodically remove old IP addresses from the users
database.

The login IP addresses are stored for spam protection and to prevent
from abuse. It is quite unlikely that we ever need the IP address of a
user whose last login is more than a week old. It makes sense to remove
such IP addresses to protect our users' privacy.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2018-05-10 21:38:25 +02:00

35 lines
1.2 KiB
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',
'aurweb-aurblup = aurweb.scripts.aurblup:main',
'aurweb-mkpkglists = aurweb.scripts.mkpkglists:main',
'aurweb-notify = aurweb.scripts.notify:main',
'aurweb-pkgmaint = aurweb.scripts.pkgmaint:main',
'aurweb-popupdate = aurweb.scripts.popupdate:main',
'aurweb-rendercomment = aurweb.scripts.rendercomment:main',
'aurweb-tuvotereminder = aurweb.scripts.tuvotereminder:main',
'aurweb-usermaint = aurweb.scripts.usermaint:main',
],
},
)