-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
54 lines (47 loc) · 1.59 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
import sys
import enot
from setuptools import setup, find_packages
def get_requirements() -> list:
with open('requirements.txt', 'r') as f:
deps = f.readlines()
result = []
for dep in deps:
if dep == '': # drop empty deps
continue
dep = get_name(dep)
if dep == 'enum34': # drop enum34 if on python 3.4+
if sys.version_info[0] == 3 and sys.version_info[1] > 4:
continue
if dep == 'pathlib': # drop pathlib if on python 3.4+
if sys.version_info[0] == 3 and sys.version_info[1] > 4:
continue
result.append(dep)
return result
def get_name(dep: str) -> str:
if '==' in dep:
[name, _] = str.split(dep, '==')
return name.strip()
else:
return dep.strip()
setup(name=enot.APPNAME,
version=enot.APPVSN,
description='Erlang package management and build system',
author=enot.APPAUTHOR,
author_email='[email protected]',
url='https://github.com/comtihon/enot',
packages=find_packages(),
install_requires=get_requirements(),
include_package_data=True,
package_data={'enot': ['resources/*']},
entry_points={
'console_scripts': [
'enot=enot.__main__:main'
]},
classifiers=[
'Programming Language :: Erlang',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Software Development :: Build Tools'
]
)