File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44# Build cross-platform wheels for py-cymbal by downloading pre-compiled binaries
55# and packaging them into appropriate platform-specific wheels.
66
7- VERSION=" 0.1.20 "
7+ VERSION=" 0.1.21 "
88CYMBAL_VERSION=" 0.11.6"
99BASE_URL=" https://github.com/1broseidon/cymbal/releases/download/v${CYMBAL_VERSION} "
1010
@@ -92,10 +92,20 @@ for plat_info in "${PLATFORMS[@]}"; do
9292 fi
9393
9494 # Build wheel
95- echo " Running python -m build"
9695 export WHEEL_PLATFORM_NAME=" $plat_tag "
97- python -m pip install build wheel
98- python -m build --wheel --no-isolation
96+ if command -v python3 & > /dev/null; then
97+ echo " Running python3 -m build"
98+ python3 -m pip install build wheel
99+ python3 -m build --wheel --no-isolation
100+ else
101+ echo " Running python -m build"
102+ python -m pip install build wheel
103+ python -m build --wheel --no-isolation
104+ fi
105+ done
106+ python -m pip install build wheel
107+ python -m build --wheel --no-isolation
108+ fi
99109done
100110
101111# Clean up
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
77
88[project ]
99name = " py-cymbal"
10- version = " 0.1.20 "
10+ version = " 0.1.21 "
1111description = " Python bindings for Cymbal code indexing and symbol discovery"
1212readme = " README.md"
1313requires-python = " >=3.7"
Original file line number Diff line number Diff line change 22from setuptools .dist import Distribution
33import os
44
5+ try :
6+ from wheel .bdist_wheel import bdist_wheel as _bdist_wheel
7+ class bdist_wheel (_bdist_wheel ):
8+ def finalize_options (self ):
9+ super ().finalize_options ()
10+ self .root_is_pure = False
11+ def get_tag (self ):
12+ python , abi , plat = super ().get_tag ()
13+ return 'py3' , 'none' , plat
14+ cmdclass = {'bdist_wheel' : bdist_wheel }
15+ except ImportError :
16+ cmdclass = {}
17+
518class BinaryDistribution (Distribution ):
619 def has_ext_modules (foo ):
720 return True
@@ -10,5 +23,6 @@ def has_ext_modules(foo):
1023
1124setup (
1225 distclass = BinaryDistribution ,
26+ cmdclass = cmdclass ,
1327 options = {'bdist_wheel' : {'plat_name' : plat_name }}
1428)
You can’t perform that action at this time.
0 commit comments