forked from plone/plone.restapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
base.cfg
181 lines (162 loc) · 4.77 KB
/
base.cfg
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
[buildout]
index = https://pypi.org/simple/
extensions = mr.developer
parts =
instance
test
test-coverage
dependencychecker
dependencies
update-translations
find-untranslated
# sphinxbuilder
# sphinx-python
deploy-to-heroku
omelette
zpretty
precompile
develop = .
sources-dir = extras
auto-checkout =
# plone.rest
allow-hosts =
*.python.org
*.plone.org
*.zope.org
pypi.org
files.pythonhosted.org
launchpad.net
code.google.com
[versions]
# Do not use a release of plone.restapi:
plone.restapi =
[instance]
recipe = plone.recipe.zope2instance
user = admin:admin
http-address = 8080
deprecation-warnings = on
eggs =
Plone
Pillow
plone.restapi [test]
environment-vars =
zope_i18n_compile_mo_files true
zcml-additional =
<configure xmlns="http://namespaces.zope.org/zope"
xmlns:plone="http://namespaces.plone.org/plone">
<plone:CORSPolicy
allow_origin="http://localhost:4300,http://127.0.0.1:4300,http://localhost:3000,http://127.0.0.1:3000"
allow_methods="DELETE,GET,OPTIONS,PATCH,POST,PUT"
allow_credentials="true"
expose_headers="Content-Length,X-My-Header"
allow_headers="Accept,Authorization,Content-Type,X-Custom-Header,Lock-Token"
max_age="3600"
/>
</configure>
[test]
recipe = zc.recipe.testrunner
eggs = ${instance:eggs}
initialization =
os.environ['TZ'] = 'UTC'
# In Python 3.8+, for the TZ environment variable to be used, it's
# necessary to explicitly call time.tzset().
import time
time.tzset()
defaults = ['-s', 'plone.restapi', '--auto-color', '--auto-progress']
[test-coverage]
recipe = collective.recipe.template
input = inline:
#!/bin/bash
export TZ=UTC
${buildout:directory}/bin/coverage run bin/test $*
${buildout:directory}/bin/coverage html
${buildout:directory}/bin/coverage report -m --fail-under=90
# Fail (exit status 1) if coverage returns exit status 2 (this happens
# when test coverage is below 100%.
output = ${buildout:directory}/bin/test-coverage
mode = 755
[dependencychecker]
recipe = zc.recipe.egg
eggs =
z3c.dependencychecker
plone.restapi
scripts = dependencychecker
[dependencies]
recipe = zc.recipe.egg
eggs =
zest.releaser[recommended]
zest.pocompile
zestreleaser.towncrier
towncrier
readme
docutils
zpretty
i18ndude
coverage
[update-translations]
recipe = collective.recipe.template
input = inline:
domain=plone.restapi
maindir=src/plone/restapi
locales=$maindir/locales
echo "Update translations for $domain"
if [ ! -f $locales/$domain.pot ]; then
# Create .pot file if it does not exist yet
touch $locales/$domain.pot
fi
if [ ! -f $locales/de/LC_MESSAGES ]; then
# Create de/LC_MESSAGES directory if it does not exist yet
mkdir -p $locales/de/LC_MESSAGES
fi
if [ ! -f $locales/de/LC_MESSAGES/$domain.po ]; then
# Create .po file if it does not exist yet
touch $locales/de/LC_MESSAGES/$domain.po
fi
${buildout:directory}/bin/i18ndude rebuild-pot --pot $locales/$domain.pot --create $domain $maindir
${buildout:directory}/bin/i18ndude sync --pot $locales/$domain.pot $locales/*/LC_MESSAGES/$domain.po
output = ${buildout:directory}/bin/update-translations
mode = 755
[find-untranslated]
recipe = collective.recipe.template
input = inline:
#!/bin/sh
bin/i18ndude find-untranslated `find -L src/plone/restapi -regex ".*\.[cz]?pt"`
output = ${buildout:directory}/bin/find-untranslated
mode = 755
[sphinxbuilder]
recipe = collective.recipe.sphinxbuilder
source = ${buildout:directory}/docs/source
build = ${buildout:directory}/docs
interpreter = ${buildout:directory}/bin/${sphinx-python:interpreter}
[sphinx-python]
recipe = zc.recipe.egg
eggs =
sphinx_rtd_theme
sphinxcontrib-httpdomain
sphinxcontrib-httpexample
interpreter = sphinxPython
[deploy-to-heroku]
recipe = collective.recipe.template
input = inline:
#!/bin/bash
git push heroku main
output = ${buildout:directory}/bin/deploy-to-heroku
mode = 755
[omelette]
recipe = collective.recipe.omelette
eggs = ${instance:eggs}
[zpretty]
recipe = collective.recipe.template
input = inline:
#!/bin/bash
find src -name '*.zcml' | xargs bin/zpretty -i
output = ${buildout:directory}/bin/zpretty-run
mode = 755
[precompile]
recipe = plone.recipe.precompiler
eggs = plone.restapi
compile-mo-files = true
[sources]
plone.rest = git git://github.com/plone/plone.rest.git [email protected]:plone/plone.rest.git branch=master
plone.schema = git git://github.com/plone/plone.schema.git [email protected]:plone/plone.schema.git branch=master
Products.ZCatalog = git git://github.com/zopefoundation/Products.ZCatalog.git [email protected]:zopefoundation/Products.ZCatalog.git