Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
56d54402
Commit
56d54402
authored
Jul 10, 2009
by
Tarek Ziadé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleaned up distutils.command.build
parent
01547984
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
15 deletions
+5
-15
command/build.py
command/build.py
+5
-15
No files found.
command/build.py
View file @
56d54402
...
...
@@ -9,13 +9,11 @@ from distutils.core import Command
from
distutils.errors
import
DistutilsOptionError
from
distutils.util
import
get_platform
def
show_compilers
():
def
show_compilers
():
from
distutils.ccompiler
import
show_compilers
show_compilers
()
class
build
(
Command
):
class
build
(
Command
):
description
=
"build everything needed to install"
...
...
@@ -53,7 +51,7 @@ class build (Command):
"list available compilers"
,
show_compilers
),
]
def
initialize_options
(
self
):
def
initialize_options
(
self
):
self
.
build_base
=
'build'
# these are decided only after 'build_base' has its final value
# (unless overridden by the user or client)
...
...
@@ -68,8 +66,7 @@ class build (Command):
self
.
force
=
0
self
.
executable
=
None
def
finalize_options
(
self
):
def
finalize_options
(
self
):
if
self
.
plat_name
is
None
:
self
.
plat_name
=
get_platform
()
else
:
...
...
@@ -118,11 +115,8 @@ class build (Command):
if
self
.
executable
is
None
:
self
.
executable
=
os
.
path
.
normpath
(
sys
.
executable
)
# finalize_options ()
def
run
(
self
):
def
run
(
self
):
# Run all relevant sub-commands. This will be some subset of:
# - build_py - pure Python modules
# - build_clib - standalone C libraries
...
...
@@ -131,7 +125,6 @@ class build (Command):
for
cmd_name
in
self
.
get_sub_commands
():
self
.
run_command
(
cmd_name
)
# -- Predicates for the sub-command list ---------------------------
def
has_pure_modules
(
self
):
...
...
@@ -146,11 +139,8 @@ class build (Command):
def
has_scripts
(
self
):
return
self
.
distribution
.
has_scripts
()
sub_commands
=
[(
'build_py'
,
has_pure_modules
),
(
'build_clib'
,
has_c_libraries
),
(
'build_ext'
,
has_ext_modules
),
(
'build_scripts'
,
has_scripts
),
]
# class build
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