forked from anacarolinats/Python-integration-lib
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsetup.py
More file actions
51 lines (43 loc) · 1.23 KB
/
setup.py
File metadata and controls
51 lines (43 loc) · 1.23 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
# encoding: utf-8
import re
from codecs import open
from setuptools import setup, find_packages
from os import path
HERE = path.abspath(path.dirname(__file__))
def read(*names):
with open(path.join(HERE, *names)) as stream:
return stream.read()
def find_info(info, *file_paths):
content = read(*file_paths)
matching = re.search(
r'''^__{}__ = ['"]([^'"]*)['"]'''.format(info),
content,
re.M
)
if matching:
return matching.group(1)
raise RuntimeError('Unable to find {} string.'.format(info))
LONG_DESCRIPTION = read('README.md')
VERSION = find_info('version', 'maxipago', '__init__.py')
AUTHOR = find_info('author', 'maxipago', '__init__.py')
AUTHOR_EMAIL = find_info('contact', 'maxipago', '__init__.py')
LICENSE = find_info('license', 'maxipago', '__init__.py')
setup(
name='maxipago',
version=VERSION,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
description='',
license=LICENSE,
keywords='',
url='https://github.com/loggi/Python-integration-lib/',
packages=find_packages(),
long_description=LONG_DESCRIPTION,
classifiers=[
"Topic :: Utilities",
],
install_requires=(
'requests==2.4.3',
'lxml==3.4.0',
),
)