File: setup.py

package info (click to toggle)
urlwatch 2.29-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 880 kB
  • sloc: python: 4,003; sh: 53; makefile: 19
file content (52 lines) | stat: -rw-r--r-- 1,639 bytes parent folder | download
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
#!/usr/bin/env python3

from setuptools import setup

import os
import re
import sys

with open(os.path.join('lib', 'urlwatch', '__init__.py')) as f:
    main_py = f.read()
m = dict(re.findall("\n__([a-z]+)__ = '([^']+)'", main_py))
docs = re.findall('"""(.*?)"""', main_py, re.DOTALL)

if sys.version_info < (3, 8):
    sys.exit('urlwatch requires Python 3.8 or newer')

m['name'] = 'urlwatch'
m['author'], m['author_email'] = re.match(r'(.*) <(.*)>', m['author']).groups()
m['description'], m['long_description'] = docs[0].strip().split('\n\n', 1)
m['install_requires'] = ['minidb>=2.0.8', 'PyYAML', 'requests', 'platformdirs', 'lxml', 'cssselect']
m['extras_require'] = {'mail': ['keyring']}
m['entry_points'] = {"console_scripts": ["urlwatch=urlwatch.cli:main"]}
m['package_dir'] = {'': 'lib'}
m['packages'] = ['urlwatch']
m['python_requires'] = '>=3.6'
m['data_files'] = [
    ('share/man/man1', [
        'share/man/man1/urlwatch.1',
    ]),
    ('share/man/man5', [
        'share/man/man5/urlwatch-config.5',
        'share/man/man5/urlwatch-filters.5',
        'share/man/man5/urlwatch-jobs.5',
        'share/man/man5/urlwatch-reporters.5',
    ]),
    ('share/man/man7', [
        'share/man/man7/urlwatch-cookbook.7',
        'share/man/man7/urlwatch-deprecated.7',
        'share/man/man7/urlwatch-intro.7',
    ]),
    ('share/urlwatch/examples', [
        'share/urlwatch/examples/hooks.py.example',
        'share/urlwatch/examples/urls.yaml.example',
    ]),
]
m['project_urls'] = {
    'Source': 'https://github.com/thp/urlwatch',
    'Tracker': 'https://github.com/thp/urlwatch/issues',
}

del m['copyright']
setup(**m)