File: setup.py

package info (click to toggle)
minidb 2.0.8-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 188 kB
  • sloc: python: 1,415; sh: 7; makefile: 3
file content (20 lines) | stat: -rw-r--r-- 598 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env python3
# Setup script for
'minidb'
# by Thomas Perl <thp.io>

import os
import re
from setuptools import setup

dirname = os.path.dirname(os.path.abspath(__file__))
src = open(os.path.join(dirname, '{}.py'.format(__doc__))).read()
docstrings = re.findall('"""(.*)"""', src)
m = dict(re.findall(r"__([a-z_]+)__\s*=\s*'([^']+)'", src))
m['name'] = __doc__
m['author'], m['author_email'] = re.match(r'(.*) <(.*)>', m['author']).groups()
m['description'] = docstrings[0]
m['py_modules'] = (m['name'],)
m['download_url'] = '{m[url]}{m[name]}-{m[version]}.tar.gz'.format(m=m)

setup(**m)