-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
59 lines (54 loc) · 1.68 KB
/
setup.py
File metadata and controls
59 lines (54 loc) · 1.68 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
52
53
54
55
56
57
58
59
from setuptools import setup
from os import path as os_path
## INFOS ##
package = 'amn'
descr = 'AMN'
url = 'https://github.com/brsynth/amn_light'
authors = 'Ramiz Khaled, Danilo Dursoniah, Jean-Loup Faulon'
corr_author = 'ramiz.khaled@inrae.fr'
## LONG DESCRIPTION
with open(
os_path.join(
os_path.dirname(os_path.realpath(__file__)),
'README.md'
),
'r',
encoding='utf-8'
) as f:
long_description = f.read()
def get_version():
with open(
os_path.join(
os_path.dirname(os_path.realpath(__file__)),
'CHANGELOG.md'
),
'r'
) as f:
lines = f.readlines()
for line in lines:
if line.startswith('##'):
from re import search
m = search(r"\[(.+)\]", line)
if m:
return m.group(1)
setup(
name = package,
version = get_version(),
author = authors,
author_email = corr_author,
description = descr,
long_description = long_description,
long_description_content_type = 'text/markdown',
url = url,
packages = [package],
package_dir = {package: package},
include_package_data = True,
test_suite = 'pytest',
license = 'MIT',
classifiers = [
'Programming Language :: Python :: 3',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
],
python_requires = '>=3.11',
)