Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(9)

Side by Side Diff: Doc/distutils/setupscript.rst

Issue 10639: reindent.py converts newlines to platform default
Patch Set: Created 8 years, 8 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Doc/distutils/index.rst ('k') | Doc/howto/logging-cookbook.rst » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 .. _setup-script: 1 .. _setup-script:
2 2
3 ************************ 3 ************************
4 Writing the Setup Script 4 Writing the Setup Script
5 ************************ 5 ************************
6 6
7 The setup script is the centre of all activity in building, distributing, and 7 The setup script is the centre of all activity in building, distributing, and
8 installing modules using the Distutils. The main purpose of the setup script is 8 installing modules using the Distutils. The main purpose of the setup script is
9 to describe your module distribution to the Distutils, so that the various 9 to describe your module distribution to the Distutils, so that the various
10 commands that operate on your modules do the right thing. As we saw in section 10 commands that operate on your modules do the right thing. As we saw in section
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 The :option:`packages` option tells the Distutils to process (build, distribute, 65 The :option:`packages` option tells the Distutils to process (build, distribute,
66 install, etc.) all pure Python modules found in each package mentioned in the 66 install, etc.) all pure Python modules found in each package mentioned in the
67 :option:`packages` list. In order to do this, of course, there has to be a 67 :option:`packages` list. In order to do this, of course, there has to be a
68 correspondence between package names and directories in the filesystem. The 68 correspondence between package names and directories in the filesystem. The
69 default correspondence is the most obvious one, i.e. package :mod:`distutils` is 69 default correspondence is the most obvious one, i.e. package :mod:`distutils` is
70 found in the directory :file:`distutils` relative to the distribution root. 70 found in the directory :file:`distutils` relative to the distribution root.
71 Thus, when you say ``packages = ['foo']`` in your setup script, you are 71 Thus, when you say ``packages = ['foo']`` in your setup script, you are
72 promising that the Distutils will find a file :file:`foo/__init__.py` (which 72 promising that the Distutils will find a file :file:`foo/__init__.py` (which
73 might be spelled differently on your system, but you get the idea) relative to 73 might be spelled differently on your system, but you get the idea) relative to
74 the directory where your setup script lives. If you break this promise, the 74 the directory where your setup script lives. If you break this promise, the
75 Distutils will issue a warning but still process the broken package anyway. 75 Distutils will issue a warning but still process the broken package anyways.
76 76
77 If you use a different convention to lay out your source directory, that's no 77 If you use a different convention to lay out your source directory, that's no
78 problem: you just have to supply the :option:`package_dir` option to tell the 78 problem: you just have to supply the :option:`package_dir` option to tell the
79 Distutils about your convention. For example, say you keep all Python source 79 Distutils about your convention. For example, say you keep all Python source
80 under :file:`lib`, so that modules in the "root package" (i.e., not in any 80 under :file:`lib`, so that modules in the "root package" (i.e., not in any
81 package at all) are in :file:`lib`, modules in the :mod:`foo` package are in 81 package at all) are in :file:`lib`, modules in the :mod:`foo` package are in
82 :file:`lib/foo`, and so forth. Then you would put :: 82 :file:`lib/foo`, and so forth. Then you would put ::
83 83
84 package_dir = {'': 'lib'} 84 package_dir = {'': 'lib'}
85 85
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 are trying to install a package. If they get a big long traceback from deep 693 are trying to install a package. If they get a big long traceback from deep
694 inside the guts of Distutils, they may think the package or the Python 694 inside the guts of Distutils, they may think the package or the Python
695 installation is broken because they don't read all the way down to the bottom 695 installation is broken because they don't read all the way down to the bottom
696 and see that it's a permission problem. 696 and see that it's a permission problem.
697 697
698 On the other hand, this doesn't help the developer to find the cause of the 698 On the other hand, this doesn't help the developer to find the cause of the
699 failure. For this purpose, the DISTUTILS_DEBUG environment variable can be set 699 failure. For this purpose, the DISTUTILS_DEBUG environment variable can be set
700 to anything except an empty string, and distutils will now print detailed 700 to anything except an empty string, and distutils will now print detailed
701 information what it is doing, and prints the full traceback in case an exception 701 information what it is doing, and prints the full traceback in case an exception
702 occurs. 702 occurs.
OLDNEW
« no previous file with comments | « Doc/distutils/index.rst ('k') | Doc/howto/logging-cookbook.rst » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+