-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·51 lines (43 loc) · 1.13 KB
/
Copy pathsetup.py
File metadata and controls
executable file
·51 lines (43 loc) · 1.13 KB
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
#!/usr/bin/env python
import re
from os import path
from setuptools import find_packages, setup
ROOT = path.dirname(__file__)
NAME = 'souschef'
DESCRIPTION = 'Automatically download and parse recipes.'
def get_version():
init_file = path.join(ROOT, NAME, '__init__.py')
pattern = re.compile("__version__ = '(?P<ver>.*?)'")
with open(init_file, 'rb') as fo:
for line in fo:
line = line.decode('utf-8')
match = pattern.match(line)
if match:
return match.group('ver')
return None
def get_packages():
pkgs = [
NAME + '.' + pkg
for pkg in find_packages(NAME, exclude=['*.tests'])
]
return [NAME] + pkgs
setup(
name=NAME,
version=get_version(),
description=DESCRIPTION,
install_requires=[
'requests==2.13.0',
'beautifulsoup4==4.5.3',
'future==0.16.0',
'configparser==3.5.0',
'sqlalchemy',
'tqdm',
'demjson'
],
packages=get_packages(),
entry_points={
'console_scripts': [
'hello_fresh_recipes=hello_fresh_recipes.recipes:main'
]
}
)