forked from AgriculturalModelExchangeInitiative/PyCrop2ML
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
73 lines (56 loc) · 1.76 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# {# pkglts, pysetup.kwds
# 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_packages
short_descr = "A Python library to generate components from Crop2ML declarative language"
readme = open('README.rst').read()
history = open('HISTORY.rst').read()
# find packages
pkgs = find_packages('src')
pkg_data = {}
nb = len(normpath(abspath("src/pycropml"))) + 1
data_rel_pth = lambda pth: normpath(abspath(pth))[nb:]
data_files = []
for root, dnames, fnames in walk("src/pycropml"):
for name in fnames:
if splitext(name)[-1] in [u'.json', u'.xml', u'.ini']:
data_files.append(data_rel_pth(pj(root, name)))
pkg_data['pycropml'] = data_files
setup_kwds = dict(
name='pycropml',
version="1.1.0",
description=short_descr,
long_description=readme + '\n\n' + history,
author="Cyrille Ahmed Midingoyi",
author_email="[email protected]",
url='https://github.com/AgriculturalModelExchangeInitiative/PyCrop2ML',
license='MIT',
zip_safe=False,
packages=pkgs,
package_dir={'': 'src'},
package_data=pkg_data,
setup_requires=[
"pytest-runner",
],
install_requires=[
],
tests_require=[
"pytest",
"pytest-mock",
],
entry_points={},
keywords='',
)
# #}
# change setup_kwds below before the next pkglts tag
setup_kwds["entry_points"] = {"console_scripts": ["cyml = pycropml.main:main"]}
setup_kwds["url"] = "https://github.com/AgriculturalModelExchangeInitiative/PyCrop2ML"
#setup_kwds["tests_require"] = ["pytest"]
# do not change things below
# {# pkglts, pysetup.call
setup(**setup_kwds)
# #}