forked from phillmac/dagr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·36 lines (30 loc) · 1001 Bytes
/
setup.py
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
#!/usr/bin/env python
import re
from setuptools import setup
def find_version(fname):
"""Attempts to find the version number in the file names fname.
Raises RuntimeError if not found.
"""
version = ''
with open(fname, 'r') as fp:
reg = re.compile(r'\s*__version__\s*=\s*[\'"]([^\'"]*)[\'"]')
for line in fp:
m = reg.match(line)
if m:
version = m.group(1)
break
if not version:
raise RuntimeError('Cannot find version information')
return version
__version__ = find_version('dagr/dagr.py')
setup(
name='dagr',
version=__version__,
description='a deviantArt image downloader script written in Python',
author='Bernard Cafarelli',
url='https://github.com/voyageur/dagr',
scripts=['dagr/dagr.py', 'dagr/dagr_bulk.py'],
data_files=[('share/dagr', ['dagr_settings.ini.sample'])],
packages=(),
install_requires=["MechanicalSoup >= 0.10.0", 'portalocker'],
)