Skip to content

Commit

Permalink
Use cibuildwheel for macos pypi release (pyscf#1802)
Browse files Browse the repository at this point in the history
* Updates

* Use cibuildwheel for macos pypi release
  • Loading branch information
sunqm authored Jul 23, 2023
1 parent f2ccae9 commit 88266d5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
24 changes: 10 additions & 14 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,31 +99,27 @@ jobs:
verbose: true

release-pypi-macos:
name: Build wheels on macos
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Build wheels
run: |
pip install wheel
export CMAKE_CONFIGURE_ARGS="-DWITH_F12=OFF"
python setup.py bdist_wheel -v --dist-dir ${{ github.workspace }}/mac-wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: cp*-macosx_x86_64 cp*-macosx_arm64
CIBW_SKIP: cp36-macosx_*
CMAKE_CONFIGURE_ARGS: "-DWITH_F12=OFF"
with:
output-dir: mac-wheels
- name: List available wheels
run: |
ls ${{ github.workspace }}/mac-wheels
ls mac-wheels
- name: Publish to PyPI
run: |
pip install twine
export TWINE_USERNAME=__token__
export TWINE_PASSWORD="${{ secrets.PYPI_API_TOKEN }}"
twine upload --verbose ${{ github.workspace }}/mac-wheels/*
twine upload --verbose /mac-wheels/*
release-conda-linux:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion pyscf/gto/basis/parse_nwchem.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def _parse(raw_basis, optimize=True):
current_basis.append(dat)
basis_sorted = [b for bs in basis_parsed for b in bs]
if not basis_sorted:
raise BasisNotFoundError(f'Basis data not found in "{raw_basis}"')
raise BasisNotFoundError('Basis data not found')

if optimize:
basis_sorted = optimize_contraction(basis_sorted)
Expand Down

0 comments on commit 88266d5

Please sign in to comment.