Show More
@@ -1,5 +1,15 b'' | |||||
1 | # encoding: utf-8 |
|
1 | # encoding: utf-8 | |
2 |
|
2 | |||
|
3 | """ | |||
|
4 | This module defines the things that are used in setup.py for building IPython | |||
|
5 | ||||
|
6 | This includes: | |||
|
7 | ||||
|
8 | * The basic arguments to setup | |||
|
9 | * Functions for finding things like packages, package data, etc. | |||
|
10 | * A function for checking dependencies. | |||
|
11 | """ | |||
|
12 | ||||
3 | __docformat__ = "restructuredtext en" |
|
13 | __docformat__ = "restructuredtext en" | |
4 |
|
14 | |||
5 | #------------------------------------------------------------------------------- |
|
15 | #------------------------------------------------------------------------------- | |
@@ -73,6 +83,9 b' setup_args = dict(' | |||||
73 | #--------------------------------------------------------------------------- |
|
83 | #--------------------------------------------------------------------------- | |
74 |
|
84 | |||
75 | def add_package(packages, pname, config=False, tests=False, scripts=False, others=None): |
|
85 | def add_package(packages, pname, config=False, tests=False, scripts=False, others=None): | |
|
86 | """ | |||
|
87 | Add a package to the list of packages, including certain subpackages. | |||
|
88 | """ | |||
76 | packages.append('.'.join(['ipython1',pname])) |
|
89 | packages.append('.'.join(['ipython1',pname])) | |
77 | if config: |
|
90 | if config: | |
78 | packages.append('.'.join(['ipython1',pname,'config'])) |
|
91 | packages.append('.'.join(['ipython1',pname,'config'])) | |
@@ -85,6 +98,9 b' def add_package(packages, pname, config=False, tests=False, scripts=False, other' | |||||
85 | packages.append('.'.join(['ipython1',pname,o])) |
|
98 | packages.append('.'.join(['ipython1',pname,o])) | |
86 |
|
99 | |||
87 | def find_packages(): |
|
100 | def find_packages(): | |
|
101 | """ | |||
|
102 | Find all of IPython's packages. | |||
|
103 | """ | |||
88 | packages = ['ipython'] |
|
104 | packages = ['ipython'] | |
89 | add_package(packages, 'config', tests=True) |
|
105 | add_package(packages, 'config', tests=True) | |
90 | add_package(packages , 'Extensions') |
|
106 | add_package(packages , 'Extensions') | |
@@ -103,6 +119,9 b' def find_packages():' | |||||
103 | #--------------------------------------------------------------------------- |
|
119 | #--------------------------------------------------------------------------- | |
104 |
|
120 | |||
105 | def find_package_data(): |
|
121 | def find_package_data(): | |
|
122 | """ | |||
|
123 | Find IPython's package_data. | |||
|
124 | """ | |||
106 | # This is not enough for these things to appear in an sdist. |
|
125 | # This is not enough for these things to appear in an sdist. | |
107 | # We need to muck with the MANIFEST to get this to work |
|
126 | # We need to muck with the MANIFEST to get this to work | |
108 | package_data = {'IPython.UserConfig' : ['*'] } |
|
127 | package_data = {'IPython.UserConfig' : ['*'] } | |
@@ -114,6 +133,9 b' def find_package_data():' | |||||
114 | #--------------------------------------------------------------------------- |
|
133 | #--------------------------------------------------------------------------- | |
115 |
|
134 | |||
116 | def find_data_files(): |
|
135 | def find_data_files(): | |
|
136 | """ | |||
|
137 | Find IPython's data_files. | |||
|
138 | """ | |||
117 |
|
139 | |||
118 | # I can't find how to make distutils create a nested dir. structure, so |
|
140 | # I can't find how to make distutils create a nested dir. structure, so | |
119 | # in the meantime do it manually. Butt ugly. |
|
141 | # in the meantime do it manually. Butt ugly. | |
@@ -149,6 +171,9 b' def find_data_files():' | |||||
149 | #--------------------------------------------------------------------------- |
|
171 | #--------------------------------------------------------------------------- | |
150 |
|
172 | |||
151 | def find_scripts(): |
|
173 | def find_scripts(): | |
|
174 | """ | |||
|
175 | Find IPython's scripts. | |||
|
176 | """ | |||
152 | scripts = [] |
|
177 | scripts = [] | |
153 | scripts.append('ipython1/kernel/scripts/ipengine') |
|
178 | scripts.append('ipython1/kernel/scripts/ipengine') | |
154 | scripts.append('ipython1/kernel/scripts/ipcontroller') |
|
179 | scripts.append('ipython1/kernel/scripts/ipcontroller') | |
@@ -174,6 +199,10 b' def find_scripts():' | |||||
174 | #--------------------------------------------------------------------------- |
|
199 | #--------------------------------------------------------------------------- | |
175 |
|
200 | |||
176 | def check_for_dependencies(): |
|
201 | def check_for_dependencies(): | |
|
202 | """Check for IPython's dependencies. | |||
|
203 | ||||
|
204 | This function should NOT be called if running under setuptools! | |||
|
205 | """ | |||
177 | from setupext.setupext import ( |
|
206 | from setupext.setupext import ( | |
178 | print_line, print_raw, print_status, print_message, |
|
207 | print_line, print_raw, print_status, print_message, | |
179 | check_for_zopeinterface, check_for_twisted, |
|
208 | check_for_zopeinterface, check_for_twisted, |
General Comments 0
You need to be logged in to leave comments.
Login now