-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
88 lines (70 loc) · 2.32 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# {{pkglts pysetup,
from os import walk
from os.path import abspath, normpath
from os.path import join as pj
from setuptools import setup, find_packages
short_descr = "Computation server oriented OpenAlea"
readme = open('README.rst').read()
history = open('HISTORY.rst').read().replace('.. :changelog:', '')
def parse_requirements(fname):
with open(fname, 'r') as f:
txt = f.read()
reqs = []
for line in txt.splitlines():
line = line.strip()
if len(line) > 0 and not line.startswith("#"):
reqs.append(line)
return reqs
# find version number in /src/$pkg_pth/version.py
version = {}
with open("src/oaserver/version.py") as fp:
exec(fp.read(), version)
data_files = []
nb = len(normpath(abspath("src/oaserver_data"))) + 1
def data_rel_pth(pth):
""" Return path relative to pkg_data
"""
abs_pth = normpath(abspath(pth))
return abs_pth[nb:]
for root, dnames, fnames in walk("src/oaserver_data"):
for name in fnames:
data_files.append(data_rel_pth(pj(root, name)))
setup(
name='oaserver',
version=version["__version__"],
description=short_descr,
long_description=readme + '\n\n' + history,
author="revesansparole",
author_email='[email protected]',
url='',
license="CeCILL-C",
zip_safe=False,
packages=find_packages('src'),
package_dir={'': 'src'},
include_package_data=True,
package_data={'oaserver_data': data_files},
install_requires=parse_requirements("requirements.txt"),
tests_require=parse_requirements("dvlpt_requirements.txt"),
entry_points={
# 'console_scripts': [
# 'fake_script = openalea.fakepackage.amodule:console_script', ],
# 'gui_scripts': [
# 'fake_gui = openalea.fakepackage.amodule:gui_script',],
# 'wralea': wralea_entry_points
},
keywords='',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2 :: Only',
'Programming Language :: Python :: 2.7'
],
test_suite='nose.collector',
)
# }}