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

Side by Side Diff: Doc/packaging/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/packaging/commandref.rst ('k') | Doc/reference/compound_stmts.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 .. _packaging-setup-script: 1 .. _packaging-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 center of all activity in building, distributing, and 7 The setup script is the center of all activity in building, distributing, and
8 installing modules using Distutils. The main purpose of the setup script is 8 installing modules using Distutils. The main purpose of the setup script is
9 to describe your module distribution to Distutils, so that the various 9 to describe your module distribution to 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 The :option:`packages` option tells the Distutils to process (build, distribute, 63 The :option:`packages` option tells the Distutils to process (build, distribute,
64 install, etc.) all pure Python modules found in each package mentioned in the 64 install, etc.) all pure Python modules found in each package mentioned in the
65 :option:`packages` list. In order to do this, of course, there has to be a 65 :option:`packages` list. In order to do this, of course, there has to be a
66 correspondence between package names and directories in the filesystem. The 66 correspondence between package names and directories in the filesystem. The
67 default correspondence is the most obvious one, i.e. package :mod:`packaging` is 67 default correspondence is the most obvious one, i.e. package :mod:`packaging` is
68 found in the directory :file:`packaging` relative to the distribution root. 68 found in the directory :file:`packaging` relative to the distribution root.
69 Thus, when you say ``packages = ['foo']`` in your setup script, you are 69 Thus, when you say ``packages = ['foo']`` in your setup script, you are
70 promising that the Distutils will find a file :file:`foo/__init__.py` (which 70 promising that the Distutils will find a file :file:`foo/__init__.py` (which
71 might be spelled differently on your system, but you get the idea) relative to 71 might be spelled differently on your system, but you get the idea) relative to
72 the directory where your setup script lives. If you break this promise, the 72 the directory where your setup script lives. If you break this promise, the
73 Distutils will issue a warning but still process the broken package anyway. 73 Distutils will issue a warning but still process the broken package anyways.
74 74
75 If you use a different convention to lay out your source directory, that's no 75 If you use a different convention to lay out your source directory, that's no
76 problem: you just have to supply the :option:`package_dir` option to tell the 76 problem: you just have to supply the :option:`package_dir` option to tell the
77 Distutils about your convention. For example, say you keep all Python source 77 Distutils about your convention. For example, say you keep all Python source
78 under :file:`lib`, so that modules in the "root package" (i.e., not in any 78 under :file:`lib`, so that modules in the "root package" (i.e., not in any
79 package at all) are in :file:`lib`, modules in the :mod:`foo` package are in 79 package at all) are in :file:`lib`, modules in the :mod:`foo` package are in
80 :file:`lib/foo`, and so forth. Then you would put :: 80 :file:`lib/foo`, and so forth. Then you would put ::
81 81
82 package_dir = {'': 'lib'} 82 package_dir = {'': 'lib'}
83 83
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 installation is broken because they don't read all the way down to the bottom 680 installation is broken because they don't read all the way down to the bottom
681 and see that it's a permission problem. 681 and see that it's a permission problem.
682 682
683 .. FIXME DISTUTILS_DEBUG is dead, document logging/warnings here 683 .. FIXME DISTUTILS_DEBUG is dead, document logging/warnings here
684 684
685 On the other hand, this doesn't help the developer to find the cause of the 685 On the other hand, this doesn't help the developer to find the cause of the
686 failure. For this purpose, the DISTUTILS_DEBUG environment variable can be set 686 failure. For this purpose, the DISTUTILS_DEBUG environment variable can be set
687 to anything except an empty string, and Packaging will now print detailed 687 to anything except an empty string, and Packaging will now print detailed
688 information about what it is doing, and prints the full traceback in case an 688 information about what it is doing, and prints the full traceback in case an
689 exception occurs. 689 exception occurs.
OLDNEW
« no previous file with comments | « Doc/packaging/commandref.rst ('k') | Doc/reference/compound_stmts.rst » ('j') | no next file with comments »

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