File tree Expand file tree Collapse file tree 2 files changed +25
-3
lines changed Open diff view settings
Expand file tree Collapse file tree 2 files changed +25
-3
lines changed Open diff view settings
Original file line number Diff line number Diff 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 )
Original file line number Diff line number Diff line change 2424import platform
2525import subprocess
2626import 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
97111def 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
138157def get_package_data ():
You can’t perform that action at this time.
0 commit comments