~sircmpwn/builds.sr.ht

builds.sr.ht/setup.py -rwxr-xr-x 1.3 KiB
570f7196Francesco Gazzetta Remove end-of-life NixOS 20.09 15 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
#!/usr/bin/env python3
from distutils.core import setup
import subprocess
import os
import sys
import importlib.resources

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

make = os.environ.get("MAKE", "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 = 'buildsrht',
  packages = [
      'buildsrht',
      'buildsrht.alembic',
      'buildsrht.alembic.versions',
      'buildsrht.blueprints',
      'buildsrht.types',
  ],
  version = ver,
  description = 'builds.sr.ht website',
  author = 'Drew DeVault',
  author_email = 'sir@cmpwn.com',
  url = 'https://git.sr.ht/~sircmpwn/builds.sr.ht',
  install_requires = [
      'srht',
      'redis',
      'celery',
      'pyyaml',
      'markdown',
      'bleach'
  ],
  license = 'AGPL-3.0',
  package_data={
      'buildsrht': [
          'templates/*.html',
          'static/*',
          'static/icons/*',
          'schema.graphqls',
          'default_query.graphql',
      ]
  },
  scripts = [
      'buildsrht-initdb',
      'buildsrht-keys',
      'buildsrht-migrate',
      'master-shell',
      'runner-shell',
  ]
)