Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6f7c52d

Browse filesBrowse files
committed
Update installer to include platform tag when generating .whl file.
1 parent 9bd3acc commit 6f7c52d
Copy full SHA for 6f7c52d

File tree

Expand file treeCollapse file tree

2 files changed

+25
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+25
-3
lines changed
Open diff view settings
Collapse file

‎tools/build.py‎

Copy file name to clipboardExpand all lines: tools/build.py
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -678,9 +678,12 @@ def install_and_run():
678678
# Run examples
679679
print("[build.py] Run examples")
680680
os.chdir(EXAMPLES_DIR)
681+
kivy_flag = "--kivy" if KIVY_FLAG else ""
681682
run_examples = os.path.join(TOOLS_DIR, "run_examples.py")
682-
ret = os.system("{python} {run_examples}"
683-
.format(python=sys.executable, run_examples=run_examples))
683+
ret = os.system("{python} {run_examples} {kivy_flag}"
684+
.format(python=sys.executable,
685+
run_examples=run_examples,
686+
kivy_flag=kivy_flag))
684687
if ret != 0:
685688
print("[build.py] ERROR while running examples")
686689
sys.exit(1)
Collapse file

‎tools/installer/cefpython3.setup.py‎

Copy file name to clipboardExpand all lines: tools/installer/cefpython3.setup.py
+20-1Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import platform
2525
import subprocess
2626
import sys
27+
import sysconfig
2728

2829
# The setuptools package is not installed by default on a clean
2930
# Ubuntu. Might be also a case on Windows. Also Python Eggs
@@ -92,6 +93,19 @@ def get_tag(self):
9293
return tag
9394

9495
cmdclass["bdist_wheel"] = custom_bdist_wheel
96+
elif platform.system() in ["Windows", "Linux"] and "bdist_wheel" in sys.argv:
97+
# On Windows and Linux platform tag is always "any".
98+
print("[setup.py] Overload bdist_wheel command to fix platform tag")
99+
from wheel.bdist_wheel import bdist_wheel
100+
101+
class custom_bdist_wheel(bdist_wheel):
102+
def get_tag(self):
103+
tag = bdist_wheel.get_tag(self)
104+
platform_tag = sysconfig.get_platform()
105+
tag = (tag[0], tag[1], platform_tag)
106+
return tag
107+
108+
cmdclass["bdist_wheel"] = custom_bdist_wheel
95109

96110

97111
def main():
@@ -132,7 +146,12 @@ def main():
132146
"Topic :: Software Development :: User Interfaces",
133147
],
134148
)
135-
print("[setup.py] OK installed")
149+
if "install" in sys.argv:
150+
print("[setup.py] OK installed")
151+
elif "bdist_wheel" in sys.argv:
152+
print("[setup.py] OK created wheel package in dist/ directory")
153+
else:
154+
print("[setup.py] Unknown command line arguments")
136155

137156

138157
def get_package_data():

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.