Commit 765003dd authored by rusty1s's avatar rusty1s
Browse files

rename wheel

parent 7ffb8e48
language: shell language: shell
os: os:
# - linux - linux
# - osx # - osx
- windows - windows
...@@ -9,7 +9,7 @@ env: ...@@ -9,7 +9,7 @@ env:
global: global:
- CUDA_HOME=/usr/local/cuda - CUDA_HOME=/usr/local/cuda
jobs: jobs:
# - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.8 IDX=cpu - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.8 IDX=cpu
# - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.8 IDX=cu92 # - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.8 IDX=cu92
# - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.8 IDX=cu100 # - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.8 IDX=cu100
# - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.8 IDX=cu101 # - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.8 IDX=cu101
...@@ -67,6 +67,7 @@ script: ...@@ -67,6 +67,7 @@ script:
- python setup.py test - python setup.py test
after_success: after_success:
- python setup.py bdist_wheel --dist-dir=dist/torch-${TORCH_VERSION}/${IDX} - python setup.py bdist_wheel --dist-dir=dist/torch-${TORCH_VERSION}/${IDX}
- python script/rename_wheel.py
- codecov - codecov
deploy: deploy:
provider: s3 provider: s3
......
import os
import os.path as osp
import glob
dist_dir = osp.join(osp.dirname(osp.abspath(__file__)), '..', 'dist')
wheels = glob.glob(osp.join('dist', '**', '*.whl'), recursive=True)
for wheel in wheels:
idx = wheel.split(osp.sep)[-2]
if idx not in ['cpu', 'cu92', 'cu100', 'cu101']:
continue
name = wheel.split(osp.sep)[-1]
if idx in name:
continue
names = name.split('-')
name = '-'.join(names[:-4] + [names[-4] + '%2B' + idx] + names[-3:])
new_wheel = osp.join(*wheel.split(osp.sep)[:-1], name)
os.rename(wheel, new_wheel)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment