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
71453977
Commit
71453977
authored
May 13, 2000
by
Gregory P. Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Harry Henry Gebel: add the "--record" option to write the list of
installed files to INSTALLED_FILES.
parent
25c47ab8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
command/install.py
command/install.py
+21
-1
No files found.
command/install.py
View file @
71453977
...
@@ -12,6 +12,7 @@ from distutils.core import Command
...
@@ -12,6 +12,7 @@ from distutils.core import Command
from
distutils
import
sysconfig
from
distutils
import
sysconfig
from
distutils.util
import
write_file
,
native_path
,
subst_vars
,
change_root
from
distutils.util
import
write_file
,
native_path
,
subst_vars
,
change_root
from
distutils.errors
import
DistutilsOptionError
from
distutils.errors
import
DistutilsOptionError
from
glob
import
glob
INSTALL_SCHEMES
=
{
INSTALL_SCHEMES
=
{
'unix_prefix'
:
{
'unix_prefix'
:
{
...
@@ -87,8 +88,10 @@ class install (Command):
...
@@ -87,8 +88,10 @@ class install (Command):
#('install-man=', None, "directory for Unix man pages"),
#('install-man=', None, "directory for Unix man pages"),
#('install-html=', None, "directory for HTML documentation"),
#('install-html=', None, "directory for HTML documentation"),
#('install-info=', None, "directory for GNU info files"),
#('install-info=', None, "directory for GNU info files"),
]
(
'record'
,
None
,
"make a record of installation"
),
]
# 'sub_commands': a list of commands this command might have to run
# 'sub_commands': a list of commands this command might have to run
# to get its work done. Each command is represented as a tuple
# to get its work done. Each command is represented as a tuple
...
@@ -151,6 +154,7 @@ class install (Command):
...
@@ -151,6 +154,7 @@ class install (Command):
#self.install_html = None
#self.install_html = None
#self.install_info = None
#self.install_info = None
self
.
record
=
None
def
finalize_options
(
self
):
def
finalize_options
(
self
):
...
@@ -441,6 +445,22 @@ class install (Command):
...
@@ -441,6 +445,22 @@ class install (Command):
"you'll have to change the search path yourself"
)
%
"you'll have to change the search path yourself"
)
%
self
.
install_lib
)
self
.
install_lib
)
# write list of installed files, if requested.
if
self
.
record
:
outputs
=
self
.
get_outputs
()
for
counter
in
xrange
(
len
(
outputs
)):
# include ".pyc" and ".pyo"
if
outputs
[
counter
][
-
3
:]
==
".py"
:
byte_code
=
glob
(
outputs
[
counter
]
+
'[co]'
)
outputs
.
extend
(
byte_code
)
outputs
.
sort
()
# just makes it look nicer
if
self
.
root
:
# strip any package prefix
root_len
=
len
(
self
.
root
)
for
counter
in
xrange
(
len
(
outputs
)):
outputs
[
counter
]
=
outputs
[
counter
][
root_len
:]
self
.
execute
(
write_file
,
(
"INSTALLED_FILES"
,
outputs
),
"Writing list of installed files"
)
# run ()
# run ()
...
...
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