Skip to content

Commit

Permalink
move to official pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
lnthach committed Feb 15, 2023
1 parent 8003f00 commit db5d5b5
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 67 deletions.
132 changes: 66 additions & 66 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,67 +5,67 @@ on:
types: [created]

jobs:
build_linux_wheels:
name: Build ${{ matrix.cibw_python }}-${{ matrix.cibw_libc }}_${{ matrix.cibw_arch }} wheel on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]

cibw_python: ["cp38", "cp39", "cp310", "cp311", "pp38"]
# SciPy and NumPy don't support musllinux
cibw_libc: ["manylinux"]
cibw_arch: ["x86_64", "i686", "aarch64"]

exclude:
# SciPy and NumPy don't support 32-bit Linux from Python 3.10 and onwards
- cibw_python: "cp310"
cibw_arch: "i686"
- cibw_python: "cp311"
cibw_arch: "i686"

# Numpy only supports pypy38 x86_64 on Linux
- cibw_python: "pp38"
cibw_arch: "i686"
- cibw_python: "pp38"
cibw_arch: "aarch64"

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install FFTW3 libraries
run: |
sudo apt-get update; sudo apt-get -y install libfftw3-dev
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.11'

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: arm64

- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel
- name: Build the wheel
run: |
python -m cibuildwheel --output-dir dist
env:
CIBW_BUILD: ${{ matrix.cibw_python }}-${{ matrix.cibw_libc }}_${{ matrix.cibw_arch }}

- uses: actions/upload-artifact@v2
name: Upload wheels as artifacts
if: ${{ github.event_name != 'pull_request' }}
with:
name: wheels
path: ./dist/*.whl
# build_linux_wheels:
# name: Build ${{ matrix.cibw_python }}-${{ matrix.cibw_libc }}_${{ matrix.cibw_arch }} wheel on ${{ matrix.os }}
# runs-on: ${{ matrix.os }}
# strategy:
# fail-fast: false
# matrix:
# os: [ubuntu-22.04]

# cibw_python: ["cp38", "cp39", "cp310", "cp311", "pp38"]
# # SciPy and NumPy don't support musllinux
# cibw_libc: ["manylinux"]
# cibw_arch: ["x86_64", "i686", "aarch64"]

# exclude:
# # SciPy and NumPy don't support 32-bit Linux from Python 3.10 and onwards
# - cibw_python: "cp310"
# cibw_arch: "i686"
# - cibw_python: "cp311"
# cibw_arch: "i686"

# # Numpy only supports pypy38 x86_64 on Linux
# - cibw_python: "pp38"
# cibw_arch: "i686"
# - cibw_python: "pp38"
# cibw_arch: "aarch64"

# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 0

# - name: Install FFTW3 libraries
# run: |
# sudo apt-get update; sudo apt-get -y install libfftw3-dev

# - uses: actions/setup-python@v4
# name: Install Python
# with:
# python-version: '3.11'

# - name: Set up QEMU
# uses: docker/setup-qemu-action@v2
# with:
# platforms: arm64

# - name: Install cibuildwheel
# run: |
# python -m pip install cibuildwheel

# - name: Build the wheel
# run: |
# python -m cibuildwheel --output-dir dist
# env:
# CIBW_BUILD: ${{ matrix.cibw_python }}-${{ matrix.cibw_libc }}_${{ matrix.cibw_arch }}

# - uses: actions/upload-artifact@v2
# name: Upload wheels as artifacts
# if: ${{ github.event_name != 'pull_request' }}
# with:
# name: wheels
# path: ./dist/*.whl

build_macos_wheels:
name: Build ${{ matrix.cibw_python }}-macosx_${{ matrix.cibw_arch }} wheel on ${{ matrix.os }}
Expand Down Expand Up @@ -124,7 +124,7 @@ jobs:

deploy:
name: Release
needs: [build_macos_wheels, build_linux_wheels]
needs: [build_macos_wheels]
# if: github.repository_owner == 'pyFFTW' && startsWith(github.ref, 'refs/tags/v') && always()
if: github.repository_owner == 'lnthach' && always()
runs-on: ubuntu-latest
Expand Down Expand Up @@ -156,11 +156,11 @@ jobs:
ls -la ${{ github.workspace }}/dist
# We prefer to release wheels before source because otherwise there is a
# small window during which users who pip install pyfftw will require compilation.
twine upload --repository testpypi ${{ github.workspace }}/dist/*.whl
twine upload --repository testpypi ${{ github.workspace }}/dist/*.tar.gz
twine upload ${{ github.workspace }}/dist/*.whl
twine upload ${{ github.workspace }}/dist/*.tar.gz
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}

- name: Github release
uses: softprops/action-gh-release@v1
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

setup(
name='mrsqm',
version="1.0.1",
version="0.0.1",
author='Thach Le Nguyen',
author_email='[email protected]',
setup_requires=[
Expand Down

0 comments on commit db5d5b5

Please sign in to comment.