forked from Othernet-Project/ndb-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
zorofile
43 lines (31 loc) · 1013 Bytes
/
zorofile
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
#!/usr/bin/env python
from zoro import *
GAE_SDK = os.path.dirname(where('appcfg.py'))
class Targets(Make):
"""
To test the package, use the `test` target.
"""
def test(self):
""" run unit tests """
wait_for_interrupt(
watch(python(
'tools/run_tests "%s" tests' % GAE_SDK.replace('\\', '\\\\')),
'.', '*.py'))
def clean(self):
""" cleans up the dist """
rmtree('dist', ignore_errors=True)
remove('MANIFEST')
def sdist(self):
""" create a source distribution locally for testing purposes """
self._setup('sdist')
def publish(self):
""" register and distribute the new version on PyPI """
self._setup('register')
self._setup('sdist --formats=zip,gztar upload')
self.clean()
@staticmethod
def _setup(args):
""" Wrapper around setup.py """
run(python('setup %s' % args), True)
if __name__ == '__main__':
Targets()()