annotate setup.py @ 1531:88f361283a19 tip

Fix url/name to pylearn2.
author Frederic Bastien <nouiz@nouiz.org>
date Mon, 09 Sep 2013 10:08:05 -0400
parents 61134776e33c
children
rev   line source
538
798607a058bd added missing files
James Bergstra <bergstrj@iro.umontreal.ca>
parents:
diff changeset
1 #!/bin/env python
798607a058bd added missing files
James Bergstra <bergstrj@iro.umontreal.ca>
parents:
diff changeset
2
1520
61134776e33c make the setup.py file work.
Frederic Bastien <nouiz@nouiz.org>
parents: 538
diff changeset
3 import os
61134776e33c make the setup.py file work.
Frederic Bastien <nouiz@nouiz.org>
parents: 538
diff changeset
4 from fnmatch import fnmatchcase
61134776e33c make the setup.py file work.
Frederic Bastien <nouiz@nouiz.org>
parents: 538
diff changeset
5 from distutils.util import convert_path
61134776e33c make the setup.py file work.
Frederic Bastien <nouiz@nouiz.org>
parents: 538
diff changeset
6 try:
61134776e33c make the setup.py file work.
Frederic Bastien <nouiz@nouiz.org>
parents: 538
diff changeset
7 from setuptools import setup
61134776e33c make the setup.py file work.
Frederic Bastien <nouiz@nouiz.org>
parents: 538
diff changeset
8 except ImportError:
61134776e33c make the setup.py file work.
Frederic Bastien <nouiz@nouiz.org>
parents: 538
diff changeset
9 from distutils.core import setup
61134776e33c make the setup.py file work.
Frederic Bastien <nouiz@nouiz.org>
parents: 538
diff changeset
10
61134776e33c make the setup.py file work.
Frederic Bastien <nouiz@nouiz.org>
parents: 538
diff changeset
11
61134776e33c make the setup.py file work.
Frederic Bastien <nouiz@nouiz.org>
parents: 538
diff changeset
12 def find_packages(where='.', exclude=()):
61134776e33c make the setup.py file work.
Frederic Bastien <nouiz@nouiz.org>
parents: 538
diff changeset
13 out = []
61134776e33c make the setup.py file work.
Frederic Bastien <nouiz@nouiz.org>
parents: 538
diff changeset
14 stack = [(convert_path(where), '')]
61134776e33c make the setup.py file work.
Frederic Bastien <nouiz@nouiz.org>
parents: 538
diff changeset
15 while stack:
61134776e33c make the setup.py file work.
Frederic Bastien <nouiz@nouiz.org>
parents: 538
diff changeset
16 where, prefix = stack.pop(0)
61134776e33c make the setup.py file work.
Frederic Bastien <nouiz@nouiz.org>
parents: 538
diff changeset
17 for name in os.listdir(where):
61134776e33c make the setup.py file work.
Frederic Bastien <nouiz@nouiz.org>
parents: 538
diff changeset
18 fn = os.path.join(where, name)
61134776e33c make the setup.py file work.
Frederic Bastien <nouiz@nouiz.org>
parents: 538
diff changeset
19 if ('.' not in name and os.path.isdir(fn) and
61134776e33c make the setup.py file work.
Frederic Bastien <nouiz@nouiz.org>
parents: 538
diff changeset
20 os.path.isfile(os.path.join(fn, '__init__.py'))
61134776e33c make the setup.py file work.
Frederic Bastien <nouiz@nouiz.org>
parents: 538
diff changeset
21 ):
61134776e33c make the setup.py file work.
Frederic Bastien <nouiz@nouiz.org>
parents: 538
diff changeset
22 out.append(prefix + name)
61134776e33c make the setup.py file work.
Frederic Bastien <nouiz@nouiz.org>
parents: 538
diff changeset
23 stack.append((fn, prefix + name + '.'))
61134776e33c make the setup.py file work.
Frederic Bastien <nouiz@nouiz.org>
parents: 538
diff changeset
24 for pat in list(exclude) + ['ez_setup', 'distribute_setup']:
61134776e33c make the setup.py file work.
Frederic Bastien <nouiz@nouiz.org>
parents: 538
diff changeset
25 out = [item for item in out if not fnmatchcase(item, pat)]
61134776e33c make the setup.py file work.
Frederic Bastien <nouiz@nouiz.org>
parents: 538
diff changeset
26 return out
61134776e33c make the setup.py file work.
Frederic Bastien <nouiz@nouiz.org>
parents: 538
diff changeset
27
538
798607a058bd added missing files
James Bergstra <bergstrj@iro.umontreal.ca>
parents:
diff changeset
28 setup(name="Pylearn",
798607a058bd added missing files
James Bergstra <bergstrj@iro.umontreal.ca>
parents:
diff changeset
29 version="0.1",
798607a058bd added missing files
James Bergstra <bergstrj@iro.umontreal.ca>
parents:
diff changeset
30 description="Pylearn",
798607a058bd added missing files
James Bergstra <bergstrj@iro.umontreal.ca>
parents:
diff changeset
31 long_description="""Machine learning toolkit""",
798607a058bd added missing files
James Bergstra <bergstrj@iro.umontreal.ca>
parents:
diff changeset
32 author="LISA",
798607a058bd added missing files
James Bergstra <bergstrj@iro.umontreal.ca>
parents:
diff changeset
33 author_email="pylearn-dev@googlegroups.com",
798607a058bd added missing files
James Bergstra <bergstrj@iro.umontreal.ca>
parents:
diff changeset
34 packages=find_packages(exclude='tests'),
798607a058bd added missing files
James Bergstra <bergstrj@iro.umontreal.ca>
parents:
diff changeset
35 )