-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
44 lines (37 loc) · 1.34 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
#!/usr/bin/env python3
from os import path
from setuptools import setup
def read_and_exec_conf(conf_file):
conf = {}
exec_str = ''
with open(conf_file, 'r', encoding='utf-8') as f:
for line in f:
exec_str += line.rstrip('\r\n') + '\n'
exec_str = exec_str.lstrip(u'\ufeff')
exec(exec_str, conf)
return conf
config = read_and_exec_conf('remotepdb_client/__config__.py')
package_data = config['PACKAGE_DATA']
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
name=package_data['name'],
version=package_data['version'],
description=package_data['description'],
url=package_data['url'],
author=package_data['author'],
author_email=package_data['author_email'],
license=package_data['license'],
classifiers=package_data['classifiers'],
keywords=package_data['keywords'],
packages=package_data['packages'],
entry_points=package_data['entry_points'],
install_requires=package_data['install_requires'],
extras_require=package_data['extras_require'],
package_data=package_data['package_data'],
data_files=package_data['data_files'],
# Derived data
long_description=long_description,
long_description_content_type='text/markdown',
)