Skip to content

Commit

Permalink
Fix to use win_amd64
Browse files Browse the repository at this point in the history
  • Loading branch information
altendky committed Aug 13, 2016
1 parent 306b57b commit b6432c9
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,27 @@ def main():
qt_bin_path = os.path.join('c:/', 'Qt', 'Qt5.7.0', '5.7', compiler_dir, 'bin')

with open('setup.cfg', 'w') as cfg:
arch = platform.architecture()
# TODO: CAMPid 994391911172312371845393249991437
bits = int(arch[0][0:2])
plat_names = {
32: 'win32',
64: 'win_amd64'
}
try:
plat_name = plat_names[bits]
except KeyError:
raise Exception('Bit depth {bits} not recognized {}'.format(plat_names.keys()))

python_tag = 'cp{major}{minor}'.format(
major=sys.version_info[0],
minor=sys.version_info[1],
)

cfg.write(
'''[bdist_wheel]
python-tag = cp{major}{minor}
plat-name = win{bits}'''.format(
major=sys.version_info[0],
minor=sys.version_info[1],
bits=bits)
)
python-tag = {python_tag}
plat-name = {plat_name}'''.format(**locals()))

designer_path = os.path.join(qt_bin_path, 'designer.exe')
designer_destination = os.path.join('PyQt5-tools', 'designer')
Expand Down

0 comments on commit b6432c9

Please sign in to comment.