-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
60 lines (42 loc) · 1.36 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# format setup arguments
from os import walk
from os.path import abspath, normpath, splitext
from os.path import join as pj
from setuptools import setup, find_namespace_packages
short_descr = "RhizoDep"
readme = open('README.md').read()
# find packages
pkgs = packages = find_namespace_packages(where='src', include=['openalea.*'])
pkg_data = {}
nb = len(normpath(abspath("src/openalea/rhizodep"))) + 1
data_rel_pth = lambda pth: normpath(abspath(pth))[nb:]
data_files = []
for root, dnames, fnames in walk("src/openalea/rhizodep"):
for name in fnames:
if splitext(name)[-1] in [u'.json', u'.ini']:
data_files.append(data_rel_pth(pj(root, name)))
pkg_data['openalea.rhizodep'] = data_files
# find version number in src/openalea/rhizodep/version.py
_version = {}
with open("src/openalea/rhizodep/version.py") as fp:
exec(fp.read(), _version)
version = _version['__version__']
setup_kwds = dict(
name='openalea.rhizodep',
version=version,
description=short_descr,
long_description=readme,
author="Frederic Rees",
author_email="[email protected]",
url='https://github.com/openalea/rhizodep',
license='cecill-c',
zip_safe=False,
packages=pkgs,
package_dir={'': 'src'},
package_data=pkg_data,
entry_points={},
keywords='',
)
setup(**setup_kwds)