-
Notifications
You must be signed in to change notification settings - Fork 4
/
Projectfile
89 lines (77 loc) · 2.55 KB
/
Projectfile
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
79
80
81
82
83
84
85
86
87
88
89
# medikit (see github.com/python-edgy/medikit)
from medikit import listen, require
from medikit.feature.make.utils import which
git = require("git")
make = require("make")
python = require("python")
sphinx = require("sphinx")
# tests
with require("pytest") as pytest:
pytest.set_version("~=5.0")
# code formater
with require("format") as fmt:
fmt.using("black", "isort")
python.setup(
name="medikit",
python_requires=">=3.5",
description="Opinionated python 3.5+ project management.",
license="Apache License, Version 2.0",
url="https://python-medikit.github.io/",
download_url="https://github.com/python-medikit/medikit/archive/{version}.tar.gz",
author="Romain Dorgueil",
author_email="romain@dorgueil.net",
entry_points={
"console_scripts": ["medikit=medikit.__main__:main"],
"medikit.feature": [
"django = medikit.feature.django:DjangoFeature",
"docker = medikit.feature.docker:DockerFeature",
"format = medikit.feature.format:FormatFeature",
"git = medikit.feature.git:GitFeature",
"kube = medikit.feature.kube:KubeFeature",
"make = medikit.feature.make:MakeFeature",
"nodejs = medikit.feature.nodejs:NodeJSFeature",
"pylint = medikit.feature.pylint:PylintFeature",
"pytest = medikit.feature.pytest:PytestFeature",
"python = medikit.feature.python:PythonFeature",
"sphinx = medikit.feature.sphinx:SphinxFeature",
"webpack = medikit.feature.webpack:WebpackFeature",
"yapf = medikit.feature.yapf:YapfFeature",
],
},
)
python.add_requirements(
"git-semver ~=0.3",
"jinja2 ~=2.10",
"mondrian ~=0.8",
"packaging ~=19.0",
"pip-tools ~=4.0",
"semantic-version ~=2.8",
"stevedore ~=1.28",
"whistle ~=1.0",
"yapf ~=0.20",
dev=["sphinx-sitemap ~=1.0", "releases >=1.6,<1.7"],
)
# Sphinx
@listen(make.on_generate)
def on_make_generate_sphinx(event):
event.makefile["SPHINX_AUTOBUILD"] = "$(PYTHON_DIRNAME)/sphinx-autobuild"
event.makefile.add_target(
"watch-$(SPHINX_SOURCEDIR)",
"""
$(SPHINX_AUTOBUILD) $(SPHINX_SOURCEDIR) $(shell mktemp -d)
""",
phony=True,
)
# Pipelines
@listen(make.on_generate)
def on_make_generate_pipelines(event):
makefile = event.makefile
# Releases
event.makefile.add_target(
"release",
"$(MEDIKIT) pipeline release start",
deps=("medikit",),
phony=True,
doc='Runs the "release" pipeline.',
)
# vim: ft=python: