forked from lisa-lab/pylearn2
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
45 lines (42 loc) · 2.18 KB
/
setup.py
File metadata and controls
45 lines (42 loc) · 2.18 KB
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
import sys
from setuptools import setup, find_packages
if 'develop' not in sys.argv:
raise NotImplementedError("since Pylearn2 is under rapid, active "
"development, `python setup.py install` is "
"intentionally disabled to prevent other "
"problems. Run `python setup.py develop` to "
"install Pylearn2.")
# Detailed notes:
# This modification of setup.py is designed to prevent two problems
# novice users frequently encountered:
# 1) Novice users frequently used "git clone" to get a copy of Pylearn2,
# then ran setup.py install, then would use "git pull" to get a bug fix
# but would forget to run "setup.py install" again.
# 2) Novice users frequently used "sudo" to make an "installed" copy of
# Pylearn2, then try to use the tutorials in the "scripts" directory in
# the "installed" copy. Since the tutorials are then in a directory owned
# by root and need to create files in the local directory, some users
# would run the tutorials using "sudo". Besides being dangerous, this
# created additional problems because "sudo" does not just run the script
# with root privileges, it actually changes the user to root, and thus
# pylearn2-related environment variables configured in the user's
# .bashrc would no longer be available.
# Installing only in development mode avoids both problems because there
# is now only a single copy of the code and it is stored in a directory
# editable by the user.
# Note that none of the Pylearn2 installation documentation recommends
# using setup.py install or pip. Most of the Pylearn2 developers just
# obtain Pylearn2 via git clone and then add it to their PYTHONPATH
# manually.
setup(
name='pylearn2',
version='0.1dev',
packages=find_packages(),
description='A machine learning library build on top of Theano.',
license='BSD 3-clause license',
long_description=open('README.rst').read(),
install_requires=['numpy>=1.5', 'theano', 'pyyaml', 'argparse'],
package_data={
'': ['*.txt', '*.rst', '*.cu', '*.cuh', '*.h'],
},
)