forked from fredboudon/vmango-lab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
40 lines (35 loc) · 1.27 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
import io
import os
from setuptools import setup, find_packages
from glob import glob
from os.path import join
def get_version(file, name='__version__'):
"""Get the version of the package from the given file by
executing it and extracting the given `name`.
"""
path = os.path.realpath(file)
version_ns = {}
with io.open(path, encoding="utf8") as f:
exec(f.read(), {}, version_ns)
return version_ns[name]
name = 'vmlab'
version = get_version(join(name, '_version.py'))
setup(
name=name,
version=version,
url='https://github.com/fredboudon/vmango-lab',
author='Frederic Boudon, Jan Vaillant, Isabelle Grechi, Frederic Normand',
author_email='[email protected]',
description='A library and an environment for mango tree modeling',
long_description='A library and an environment for the simulation and analysis of mango tree growth, development, fruit production and architecture.',
license='Cecill-C',
packages=find_packages(),
include_package_data=True,
package_data={
'vmlab': [
os.path.join(*path.split('/')[1:]) for path in glob('vmlab/data/**/*.*', recursive=True)
] + [
os.path.join(*path.split('/')[1:]) for path in glob('vmlab/processes/*.lpy')
],
}
)