-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.yml
More file actions
56 lines (48 loc) · 1.44 KB
/
build.yml
File metadata and controls
56 lines (48 loc) · 1.44 KB
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
imports:
- path: pyproject.toml
as: project
- path: ../common.build.yml
as: common
vars:
version: $(${common.get_version} ${PROJECT_DIR})
package_name: $(echo ${project.name} | tr '-' '_')
build_dir: ${PROJECT_DIR}/${package_name}
dist_dir: ${PROJECT_DIR}/dist
files-groups:
source-files:
- ${PROJECT_DIR}/src/**/*.py
- ${PROJECT_DIR}/pyproject.toml
- ${PROJECT_DIR}/src/**/*.json
- ${PROJECT_DIR}/src/**/*.xml
rules:
build:
tags:
- build
required-files: source-files
expected-files:
- ${dist_dir}/${package_name}-${version}.tar.gz
- ${dist_dir}/${package_name}-${version}-py3-none-any.whl
commands:
- cp -r ${PROJECT_DIR}/src ${build_dir}
- ${common.create_metadata} ${build_dir} -v ${version} -p ${PROJECT_DIR}/pyproject.toml
- MSM_VERSION=${version} ${PYTHON} -m build --wheel --sdist --outdir ${dist_dir} ${PROJECT_DIR}
- +ALWAYS rm -rf ${build_dir}
# install-editable:
# tags:
# - dev-setup
# required-files: source-files
# commands:
# - $(PYTHON) -m pip install -e ${PROJECT_DIR}
# install:
# tags:
# - setup
# required-files:
# - dist/${package_name}-${version}.py3-none-any.whl
# commands:
# - $(PYTHON) -m pip install dist/${package_name}-${version}.py3-none-any.whl
# tests:
# tags:
# - test
# required-files: source-files
# commands:
# - $(PYTHON) -m unittest discover -s tests