-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
60 lines (50 loc) · 1.86 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
54
55
56
57
58
59
60
import os
from setuptools import setup, find_packages
def read(rel_path):
"""Read a file so python does not have to import it.
Inspired by (taken from) pip's `setup.py`.
"""
here = os.path.abspath(os.path.dirname(__file__))
# intentionally *not* adding an encoding option to open, See:
# https://github.com/pypa/virtualenv/issues/201#issuecomment-3145690
with open(os.path.join(here, rel_path), 'r') as fp:
return fp.read()
def get_version(rel_path):
"""Manually read through a file to retrieve its `__version__`.
Inspired by (taken from) pip's `setup.py`.
"""
for line in read(rel_path).splitlines():
if line.startswith('__version__'):
# __version__ = '0.0.1'
delim = "'" if "'" in line else '"'
return line.split(delim)[1]
raise RuntimeError('Unable to find version string.')
with open('README.md', 'r') as readme_file:
readme = readme_file.read()
pkg_name = 'heartandsole'
setup(
name=pkg_name,
version=get_version(f'{pkg_name}/__init__.py'),
author='Aaron Schroeder',
author_email='aaron@trailzealot.com',
description='Python library for analysis of running activity data',
long_description=readme,
long_description_content_type='text/markdown',
url='https://github.com/aaron-schroeder/heartandsole',
project_urls={
'Documentation': 'https://heartandsole.readthedocs.io/en/stable/',
},
packages=find_packages(exclude=['docs', 'test', 'exclude', 'checklists']),
python_requires='>=3.7',
install_requires=['numpy>=1.15', 'pandas>=1.0.0'],
license='MIT License',
classifiers=[
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'License :: OSI Approved :: MIT License',
],
)