Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
1ecc2515
Commit
1ecc2515
authored
Apr 19, 2000
by
Greg Ward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed '\package' to \module'.
parent
a021acac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
Doc/dist/dist.tex
Doc/dist/dist.tex
+6
-6
No files found.
Doc/dist/dist.tex
View file @
1ecc2515
...
...
@@ -254,7 +254,7 @@ distribute, install, etc.) all pure Python modules found in each package
mentioned in the
\option
{
packages
}
list. In order to do this, of
course, there has to be a correspondence between package names and
directories in the filesystem. The default correspondence is the most
obvious one, i.e. package
\
packag
e
{
distutils
}
is found in the directory
obvious one, i.e. package
\
modul
e
{
distutils
}
is found in the directory
\file
{
distutils
}
relative to the distribution root. Thus, when you say
\code
{
packages = ['foo']
}
in your setup script, you are promising that
the Distutils will find a file
\file
{
foo/
\_\_
init
\_\_
.py
}
(which might
...
...
@@ -267,7 +267,7 @@ If you use a different convention to lay out your source directory,
that's no problem: you just have to supply the
\option
{
package
\_
dir
}
option to tell the Distutils about your convention. For example, say
you keep all Python source under
\file
{
lib
}
, so that modules not in any
package are right in
\file
{
lib
}
, modules in the
\
packag
e
{
foo
}
package
package are right in
\file
{
lib
}
, modules in the
\
modul
e
{
foo
}
package
are in
\file
{
lib/foo
}
, and so forth. Then you would put
\begin{verbatim}
package
_
dir =
{
'': 'lib'
}
...
...
@@ -279,15 +279,15 @@ distribution root.) In this case, when you say
\code
{
packages = ['foo']
}
, you are promising that the file
\file
{
lib/foo/
\_\_
init
\_\_
.py
}
exists.
Another possible convention is to put the
\
packag
e
{
foo
}
package right in
\file
{
lib
}
, the
\
packag
e
{
foo.bar
}
package in
\file
{
lib/bar
}
, etc. This
Another possible convention is to put the
\
modul
e
{
foo
}
package right in
\file
{
lib
}
, the
\
modul
e
{
foo.bar
}
package in
\file
{
lib/bar
}
, etc. This
would be written in the setup script as
\begin{verbatim}
package
_
dir =
{
'foo': 'lib'
}
\end{verbatim}
Note that a
\code
{
\var
{
package
}
:
\var
{
dir
}}
entry in the
\option
{
package
\_
dir
}
option implicitly applies to all packages below
\var
{
package
}
, so the
\
packag
e
{
foo.bar
}
case is automatically handled
\var
{
package
}
, so the
\
modul
e
{
foo.bar
}
case is automatically handled
here. In this example, having
\code
{
packages = ['foo', 'foo.bar']
}
tells the Distutils to look for
\file
{
lib/
\_\_
init
\_\_
.py
}
and
\file
{
lib/bar/
\_\_
init
\_\_
.py
}
.
...
...
@@ -305,7 +305,7 @@ slightly more involved example:
py
_
modules = ['mod1', 'pkg.mod2']
\end{verbatim}
This describes two modules, one of them in the ``root'' package, the
other in the
\
packag
e
{
pkg
}
package. Again, the default
other in the
\
modul
e
{
pkg
}
package. Again, the default
package/directory layout implies that these two modules can be found in
\file
{
mod1.py
}
and
\file
{
pkg/mod2.py
}
, and that
\file
{
pkg/
\_\_
init
\_\_
.py
}
exists as well. And again, you can override the package/directory
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment