Use build
instead of setup.py sdist
#158
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build OSX wheels | |
env: | |
CIBW_ARCHS_MACOS: "x86_64" | |
on: [push] | |
jobs: | |
build_osx: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Download and build MeCab | |
shell: bash | |
run: | | |
git clone --depth=1 https://github.com/taku910/mecab.git | |
cd mecab/mecab | |
./configure --enable-utf8-only | |
make | |
sudo make install | |
cd ../.. | |
python -m pip install --upgrade setuptools wheel pip setuptools-scm | |
python -m pip install cibuildwheel==2.3.1 | |
pip install -r requirements.txt | |
python -m cibuildwheel --output-dir dist | |
- name: Upload Wheels | |
uses: actions/upload-artifact@v1 | |
with: | |
name: osx-wheels | |
path: dist | |
- name: Publish to PyPI if tagged | |
if: startsWith(github.ref, 'refs/tags') | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: | | |
pip install twine | |
twine upload dist/fugashi* | |