~sircmpwn/core.sr.ht

core.sr.ht/setup.py -rwxr-xr-x 1.6 KiB
b695e020Drew DeVault Add "internal_anon" path for internal auth tokens 2 days 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
#!/usr/bin/env python3
from setuptools import setup
import subprocess
import glob
import os
import sys

if subprocess.call(["npm", "i"], cwd="srht") != 0:
    sys.exit(1)

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

setup(
  name = 'srht',
  packages = [
      'srht',
      'srht.alembic',
      'srht.alembic.versions',
      'srht.graphql',
      'srht.oauth',
      'srht.webhook',
  ],
  version = ver,
  description = 'sr.ht core modules',
  author = 'Drew DeVault',
  author_email = 'sir@cmpwn.com',
  url = 'https://git.sr.ht/~sircmpwn/srht',
  install_requires = [
      'flask',
      'humanize',
      'sqlalchemy',
      'sqlalchemy-utils',
      'psycopg2',
      'markdown',
      'mistletoe',
      'bleach',
      'requests',
      'BeautifulSoup4',
      'pgpy',
      'pygments',
      'cryptography',
      'prometheus_client',
      'alembic',
      'redis',
  ],
  license = 'BSD-3-Clause',
  package_data={
      'srht': [
          'Makefile',
          'minify-css.js',
          'package.json',
          'templates/*.html',
          'scss/*.scss',
          'scss/*.css',
          'scss/bootstrap/LICENSE',
          'static/*'
      ] + [f[5:] for f in glob.glob('srht/node_modules/**', recursive=True)] \
        + [f[5:] for f in glob.glob('srht/static/**', recursive=True)] \
        + [f[5:] for f in glob.glob('srht/scss/bootstrap/scss/**/*.scss', recursive=True)]
  },
  scripts = [
      'srht-update-profiles',
      'srht-migrate',
      'srht-keygen',
  ]
)