-
Notifications
You must be signed in to change notification settings - Fork 7
/
pavement.py
59 lines (52 loc) · 1.46 KB
/
pavement.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
import errno
import os
from setuptools import Extension
from paver.easy import *
from paver.path import path
from paver.setuputils import setup
setup(
name="gogreen",
description="Coroutine utilities for non-blocking I/O with greenlet",
version="1.0.1",
license="bsd",
author="Libor Michalek",
author_email="[email protected]",
packages=["gogreen"],
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: Unix",
"Programming Language :: Python",
"Topic :: System :: Networking",
]
)
MANIFEST = (
"LICENSE",
"setup.py",
"paver-minilib.zip",
)
@task
def manifest():
path('MANIFEST.in').write_lines('include %s' % x for x in MANIFEST)
@task
@needs('generate_setup', 'minilib', 'manifest', 'setuptools.command.sdist')
def sdist():
pass
@task
def clean():
for p in map(path, ('gogreen.egg-info', 'dist', 'build', 'MANIFEST.in')):
if p.exists():
if p.isdir():
p.rmtree()
else:
p.remove()
for p in path(__file__).abspath().parent.walkfiles():
if p.endswith(".pyc") or p.endswith(".pyo"):
try:
p.remove()
except OSError, exc:
if exc.args[0] == errno.EACCES:
continue
raise