-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
53 lines (45 loc) · 1.48 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import os
import re
from setuptools import setup
from setuptools import find_packages
def read_file(filename):
"""Open and a file, read it and return its contents."""
path = os.path.join(os.path.dirname(__file__), filename)
with open(path) as f:
return f.read()
def get_version():
"""Extract and return version number from the packages '__init__.py'."""
init_path = os.path.join('sppy', '__init__.py')
content = read_file(init_path)
match = re.search(r"__version__ = '([^']+)'", content, re.M)
version = match.group(1)
return version
setup(
# Meta-Data
name='python-systempay-mock',
version=get_version(),
author='Bastian Bretagne',
maintainer='Bastian Bretagne',
url='https://github.com/bastianb/sppy',
description=('Python SystemPay Mock is a mock of the systempay'
'Payment Form service.'
'See: https://systempay.cyberpluspaiement.com/html/'),
long_description=open('README.md').read(),
# download_url='#TODO',
# classifiers='#TODO',
# platforms='#TODO',
# license='#TODO',
# Install config
packages=find_packages(include=('sppy*',)),
include_package_data=True,
install_requires=open('requirements.txt').read(),
entry_points={
'console_scripts': [
'sppy=sppy.scripts.cli:cli'
],
}
)