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
b4bb64e2
Commit
b4bb64e2
authored
22 years ago
by
Jack Jansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added preInstall and postInstall commands to packages. PIL needs this
(preInstall, at least).
parent
e1ebd80b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
Lib/plat-mac/pimp.py
Lib/plat-mac/pimp.py
+17
-1
No files found.
Lib/plat-mac/pimp.py
View file @
b4bb64e2
...
...
@@ -176,7 +176,9 @@ class PimpPackage:
longdesc
=
None
,
downloadURL
=
None
,
installTest
=
None
,
prerequisites
=
None
):
prerequisites
=
None
,
preInstall
=
None
,
postInstall
=
None
):
self
.
_db
=
db
self
.
name
=
name
self
.
version
=
version
...
...
@@ -186,6 +188,8 @@ class PimpPackage:
self
.
downloadURL
=
downloadURL
self
.
_installTest
=
installTest
self
.
_prerequisites
=
prerequisites
self
.
_preInstall
=
preInstall
self
.
_postInstall
=
postInstall
def
dump
(
self
):
dict
=
{
...
...
@@ -205,6 +209,10 @@ class PimpPackage:
dict
[
'installTest'
]
=
self
.
_installTest
if
self
.
_prerequisites
:
dict
[
'prerequisites'
]
=
self
.
_prerequisites
if
self
.
_preInstall
:
dict
[
'preInstall'
]
=
self
.
_preInstall
if
self
.
_postInstall
:
dict
[
'postInstall'
]
=
self
.
_postInstall
return
dict
def
__cmp__
(
self
,
other
):
...
...
@@ -312,8 +320,16 @@ class PimpPackage:
msg
=
self
.
unpackSinglePackage
(
output
)
if
msg
:
return
"unpack %s: %s"
%
(
_fmtpackagename
(
self
),
msg
)
if
self
.
_preInstall
:
if
self
.
_cmd
(
output
,
self
.
_buildDirname
,
self
.
_preInstall
):
return
"pre-install %s: running
\
"
%s
\
"
failed"
%
\
(
_fmtpackagename
(
self
),
self
.
_preInstall
)
if
self
.
_cmd
(
output
,
self
.
_buildDirname
,
sys
.
executable
,
"setup.py install"
):
return
"install %s: running
\
"
setup.py install
\
"
failed"
%
_fmtpackagename
(
self
)
if
self
.
_postInstall
:
if
self
.
_cmd
(
output
,
self
.
_buildDirname
,
self
.
_postInstall
):
return
"post-install %s: running
\
"
%s
\
"
failed"
%
\
(
_fmtpackagename
(
self
),
self
.
_postInstall
)
return
None
class
PimpInstaller
:
...
...
This diff is collapsed.
Click to expand it.
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