61 lines
1.5 KiB
Python
61 lines
1.5 KiB
Python
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",
|
|
license="bsd",
|
|
author="Libor Michalek",
|
|
author_email="libor@pobox.com",
|
|
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",
|
|
"itimermodule.c",
|
|
)
|
|
|
|
@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, ('itimer.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
|