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
370248d7
Commit
370248d7
authored
Jun 24, 2000
by
Greg Ward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some clarifications to the 'A simple example' section.
parent
19c67f83
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
Doc/dist/dist.tex
Doc/dist/dist.tex
+8
-6
No files found.
Doc/dist/dist.tex
View file @
370248d7
...
...
@@ -69,27 +69,29 @@ without having to run a single setup script or compile a line of code.
The setup script is usually quite simple, although since it's written in
Python, there are no arbitrary limits to what you can do. If all you
want to do is distribute a module called
\module
{
foo
}
, contained in a
file
\file
{
foo.py
}
, then you
can get away with
as little as this:
file
\file
{
foo.py
}
, then you
r setup script can be
as little as this:
\begin{verbatim}
from distutils.core import setup
setup (name = "foo",
version = "1.0",
py
_
modules = ["foo"])
\end{verbatim}
Some observations:
\begin{itemize}
\item
all
information that you supply to the Distutils is supplied as
\item
most
information that you supply to the Distutils is supplied as
keyword arguments to the
\function
{
setup()
}
function
\item
those keyword arguments fall into two categories: package
meta-data (name, version number) and information about what's in the
package (
list of pure
modules, in this case)
package (
a list of pure Python
modules, in this case)
\item
modules are specified by module name, not filename (the same will
hold true for packages and extensions)
\item
it's recommended that you supply a little more meta-data, in
particular your name, email address and a URL for the project
\end{itemize}
To create a source distribution for this module, you would run
To create a source distribution for this module, you would create a
setup script,
\file
{
setup.py
}
, containing the above code, and run:
\begin{verbatim}
python setup.py sdist
\end{verbatim}
...
...
@@ -136,8 +138,8 @@ industrial-strength applications that need the full capabilities of a
``real'' installer.
\command
{
bdist
\_
wininst
}
creates a self-extracting
zip file with a minimal user interface, which is enough for small- to
medium-sized module collections. You'll need to have version XXX of
Wise installed on your system for the
\command
{
bdist
\_
wise
}
to work;
it's available from
\url
{
http://foo/bar/baz
}
.)
Wise installed on your system for the
\command
{
bdist
\_
wise
}
command to
work;
it's available from
\url
{
http://foo/bar/baz
}
.)
Other
\command
{
bdist
}
commands exist for other platforms: for example,
\command
{
bdist
\_
rpm
}
for RPM-based Linux systems, (
\command
{
bdist
\_
deb
}
)
...
...
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