diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index 273aa8d71f..0173803cc0 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -13,41 +13,14 @@ jobs: matrix: include: # linux-64 - - os: ubuntu-latest - python: 37 - platform_id: manylinux_x86_64 - - os: ubuntu-latest - python: 38 - platform_id: manylinux_x86_64 - - os: ubuntu-latest - python: 39 - platform_id: manylinux_x86_64 - os: ubuntu-latest python: 310 platform_id: manylinux_x86_64 # macos-x86-64 - - os: macos-latest - python: 37 - platform_id: macosx_x86_64 - - os: macos-latest - python: 38 - platform_id: macosx_x86_64 - - os: macos-latest - python: 39 - platform_id: macosx_x86_64 - os: macos-latest python: 310 platform_id: macosx_x86_64 # win-64 - - os: windows-2019 - python: 37 - platform_id: win_amd64 - - os: windows-2019 - python: 38 - platform_id: win_amd64 - - os: windows-2019 - python: 39 - platform_id: win_amd64 - os: windows-2019 python: 310 platform_id: win_amd64 diff --git a/pyproject.toml b/pyproject.toml index 5e6b389653..66b1c724ba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,7 @@ write_to = "deepmd/_version.py" [tool.cibuildwheel] test-command = "dp -h" test-requires = "tensorflow" -build = ["cp37-*", "cp38-*", "cp39-*", "cp310-*"] +build = ["cp310-*"] skip = ["*-win32", "*-manylinux_i686", "*-musllinux*"] # TODO: bump to "latest" tag when CUDA supports GCC 12 manylinux-x86_64-image = "quay.io/pypa/manylinux_2_28_x86_64:2022-11-19-1b19e81" diff --git a/setup.py b/setup.py index 89bb7a011f..387ce9e6f9 100644 --- a/setup.py +++ b/setup.py @@ -4,6 +4,7 @@ import sys from skbuild import setup +from wheel.bdist_wheel import bdist_wheel topdir = os.path.abspath(os.path.dirname(__file__)) sys.path.insert(0, os.path.join(topdir, 'backend')) @@ -38,6 +39,14 @@ tf_version = get_tf_version(tf_install_dir) +class bdist_wheel_abi3(bdist_wheel): + def get_tag(self): + python, abi, plat = super().get_tag() + if python.startswith("cp"): + return "py37", "none", plat + return python, abi, plat + + # TODO: migrate packages and entry_points to pyproject.toml after scikit-build supports it # See also https://scikit-build.readthedocs.io/en/latest/usage.html#setuptools-options setup( @@ -89,4 +98,7 @@ **get_tf_requirement(tf_version), }, entry_points={"console_scripts": ["dp = deepmd.entrypoints.main:main"]}, + cmdclass = { + "bdist_wheel": bdist_wheel_abi3, + }, )