Mercurial > pylearn
comparison setup.py @ 1520:61134776e33c
make the setup.py file work.
author | Frederic Bastien <nouiz@nouiz.org> |
---|---|
date | Wed, 31 Oct 2012 14:36:55 -0400 |
parents | 798607a058bd |
children |
comparison
equal
deleted
inserted
replaced
1519:04d859714506 | 1520:61134776e33c |
---|---|
1 #!/bin/env python | 1 #!/bin/env python |
2 | 2 |
3 from ez_setup import use_setuptools | 3 import os |
4 use_setuptools() | 4 from fnmatch import fnmatchcase |
5 from setuptools import setup, find_packages, Extension, Library | 5 from distutils.util import convert_path |
6 try: | |
7 from setuptools import setup | |
8 except ImportError: | |
9 from distutils.core import setup | |
10 | |
11 | |
12 def find_packages(where='.', exclude=()): | |
13 out = [] | |
14 stack = [(convert_path(where), '')] | |
15 while stack: | |
16 where, prefix = stack.pop(0) | |
17 for name in os.listdir(where): | |
18 fn = os.path.join(where, name) | |
19 if ('.' not in name and os.path.isdir(fn) and | |
20 os.path.isfile(os.path.join(fn, '__init__.py')) | |
21 ): | |
22 out.append(prefix + name) | |
23 stack.append((fn, prefix + name + '.')) | |
24 for pat in list(exclude) + ['ez_setup', 'distribute_setup']: | |
25 out = [item for item in out if not fnmatchcase(item, pat)] | |
26 return out | |
27 | |
6 setup(name="Pylearn", | 28 setup(name="Pylearn", |
7 version="0.1", | 29 version="0.1", |
8 description="Pylearn", | 30 description="Pylearn", |
9 long_description="""Machine learning toolkit""", | 31 long_description="""Machine learning toolkit""", |
10 author="LISA", | 32 author="LISA", |
11 author_email="pylearn-dev@googlegroups.com", | 33 author_email="pylearn-dev@googlegroups.com", |
12 packages=find_packages(exclude='tests'), | 34 packages=find_packages(exclude='tests'), |
13 ) | 35 ) |
14 |