~sircmpwn/lists.sr.ht

lists.sr.ht/setup.py -rwxr-xr-x 1.2 KiB View raw
96e3c7c2Eli Schwartz setup.py: use importlib.resources from python 3.7 to find core.sr.ht Makefile 25 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
#!/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 = 'listssrht',
  packages = [
      'listssrht',
      'listssrht.types',
      'listssrht.blueprints',
      'listssrht.blueprints.api',
      'listssrht.alembic',
      'listssrht.alembic.versions'
  ],
  version = ver,
  description = 'lists.sr.ht website',
  author = 'Drew DeVault',
  author_email = 'sir@cmpwn.com',
  url = 'https://git.sr.ht/~sircmpwn/lists.sr.ht',
  install_requires = [
      'srht',
      'emailthreads',
      'aiosmtpd',
      'asyncpg',
      'pygit2',
  ],
  license = 'AGPL-3.0',
  package_data={
      'listssrht': [
          'templates/*.html',
          'static/icons/*',
          'static/*'
      ]
  },
  scripts = [
      'listssrht-initdb',
      'listssrht-lmtp',
      'listssrht-migrate',
  ],
)