This repository has been archived by the owner on May 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.py
79 lines (59 loc) · 1.69 KB
/
build.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
'''
StructModel build script.
'''
#
# Imports
#
from pybuilder.core import init, use_plugin, Author
#
# Plugins
#
use_plugin('python.core')
use_plugin('python.install_dependencies')
use_plugin('python.unittest')
use_plugin('python.integrationtest')
use_plugin('python.pylint')
use_plugin('python.coverage')
use_plugin('python.distutils')
#
# Attributes
#
shortname = 'struct-model'
name = 'StructModel: Structured Data Model'
version = '1.0.1'
url = 'https://github.com/pursultani/struct-model'
summary = '''An open data structure, similar to Ruby OpenStruct, with optional type checking,
validation, and JSON mapping.'''
authors = [
Author('Hossein Pursultani', '[email protected]')
]
description = open('README.adoc').read()
license = open('LICENSE').read().replace('\n', ' ')
#
# Tasks
#
default_task = ( 'install_dependencies', 'analyze', 'publish' )
#
# Initialization
#
@init
def initialize(project):
#
# Properties
#
project.set_property('name', shortname)
project.set_property('version', version)
project.set_property('dir_source_main_python', 'src')
project.set_property('dir_source_main_scripts', 'bin')
project.set_property('dir_target', 'build')
project.set_property('dir_dist', '$dir_target/dist/%s-$version' % shortname)
project.set_property('dir_dist_scripts', 'bin')
project.set_property('dir_source_unittest_python', 'tests/unit')
project.set_property('dir_source_integrationtest_python', 'tests/integration')
project.set_property('distutils_classifiers', [])
project.set_property('distutils_commands', [])
#
# Dependencies
#
project.build_depends_on('mockito')
project.depends_on_requirements('requirements.txt')