Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.buildout
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos.buildout
Commits
9c6be7ac
Commit
9c6be7ac
authored
Aug 24, 2012
by
Guy Rozendorn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Testing for 64bit by using struct, same way as distribute does
parent
fe54eb2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
src/zc/buildout/easy_install.py
src/zc/buildout/easy_install.py
+3
-1
No files found.
src/zc/buildout/easy_install.py
View file @
9c6be7ac
...
...
@@ -30,6 +30,7 @@ import setuptools.archive_util
import
setuptools.command.setopt
import
setuptools.package_index
import
shutil
import
struct
import
subprocess
import
sys
import
tempfile
...
...
@@ -51,6 +52,7 @@ logger = logging.getLogger('zc.buildout.easy_install')
url_match
=
re
.
compile
(
'[a-z0-9+.-]+://'
).
match
is_win32
=
sys
.
platform
==
'win32'
is_64
=
struct
.
calcsize
(
"P"
)
==
8
is_jython
=
sys
.
platform
.
startswith
(
'java'
)
is_distribute
=
(
pkg_resources
.
Requirement
.
parse
(
'setuptools'
).
key
==
'distribute'
)
...
...
@@ -1460,7 +1462,7 @@ def _write_script(full_name, contents, logged_type):
script_name
+=
'-script.py'
# Generate exe file and give the script a magic name.
exe
=
full_name
+
'.exe'
new_data
=
pkg_resources
.
resource_string
(
'setuptools'
,
'cli-64.exe'
if
sys
.
maxsize
>
2
**
32
else
'cli-32.exe'
)
new_data
=
pkg_resources
.
resource_string
(
'setuptools'
,
'cli-64.exe'
if
is_64
else
'cli-32.exe'
)
if
not
os
.
path
.
exists
(
exe
)
or
(
open
(
exe
,
'rb'
).
read
()
!=
new_data
):
# Only write it if it's different.
open
(
exe
,
'wb'
).
write
(
new_data
)
...
...
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