~fnux/meta.sr.ht

meta.sr.ht/setup.py -rwxr-xr-x 1.6 KiB
28f5dba0Timothée Floure auth: remove duplicated password reset log for LDAP backend 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/usr/bin/env python3
import importlib.resources
import os
import subprocess
import sys

from setuptools import setup

with importlib.resources.path('srht', 'Makefile') as f:
    srht_path = f.parent.as_posix()

make = os.environ.get("MAKE") or "make"
subp = subprocess.run([make, "SRHT_PATH=" + srht_path])
if subp.returncode != 0:
    sys.exit(subp.returncode)

ver = os.environ.get("PKGVER") or subprocess.run(['git', 'describe', '--tags'],
      stdout=subprocess.PIPE).stdout.decode().strip()

setup(
  name = 'metasrht',
  packages = [
      'metasrht',
      'metasrht.types',
      'metasrht.auth',
      'metasrht.blueprints',
      'metasrht.blueprints.api',
      'metasrht.alembic',
      'metasrht.alembic.versions'
  ],
  version = ver,
  description = 'meta.sr.ht website',
  author = 'Drew DeVault',
  author_email = 'sir@cmpwn.com',
  url = 'https://git.sr.ht/~sircmpwn/meta.sr.ht',
  install_requires = [
      'alembic',
      'bcrypt',
      'pgpy',
      'pystache',
      'qrcode',
      'redis',
      'srht',
      'sshpubkeys',
      'stripe',
      'prometheus_client',
      'weasyprint',
      'zxcvbn'
  ],
  extras_require = {
      'unix-pam-auth': ['python_pam'],
  },
  license = 'AGPL-3.0',
  package_data={
      'metasrht': [
          'templates/*.html',
          'static/*',
          'static/icons/*',
          'emails/*',
          'schema.graphqls',
          'default_query.graphql',
      ]
  },
  scripts = [
      'metasrht-daily',
      'metasrht-initdb',
      'metasrht-invoicestats',
      'metasrht-manageuser',
      'metasrht-migrate',
  ]
)