-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathsetup.py
More file actions
51 lines (39 loc) · 1.34 KB
/
setup.py
File metadata and controls
51 lines (39 loc) · 1.34 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
import codecs
import json
import pathlib
import re
from setuptools import find_packages, setup
PACKAGE_PATH = pathlib.Path(__file__).parent
def read(*paths):
file = str(PACKAGE_PATH.joinpath(*paths).resolve())
with codecs.open(file) as f:
return f.read()
def find_version(*paths):
version_file = read(*paths)
version_pattern = re.compile(r"^__version__ = ['\"]([^'\"]*)['\"]", re.M)
version_match = version_pattern.search(version_file)
if version_match:
return version_match.group(1)
else:
raise RuntimeError('Unable to find version string.')
with codecs.open("requirements.txt") as f:
REQUIREMENTS = f.read().splitlines()
with codecs.open("extras_requirements.json", "r") as f:
EXTRAS_REQUIREMENTS = json.load(f)
DESCRIPTION = 'Python analytical scripts that will overcome ' \
'paralysis in your data analysis.'
LONG_DESCRIPTION = read('README.rst')
setup(
name='paralytics',
version=find_version('paralytics', '__init__.py'),
author='Mateusz Zakrzewski, Łukasz Bala',
author_email="paralytics@gmail.com",
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
url='https://mrtovsky.github.io/Paralytics/',
install_requires=REQUIREMENTS,
extras_require=EXTRAS_REQUIREMENTS,
license='MIT',
packages=find_packages('.'),
zip_safe=True
)