Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 17 additions & 24 deletions .github/workflows/pip4linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,45 +12,38 @@ on:

jobs:
build:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest]
python-version: ["3.9",
"3.10",
"3.11",
"3.12",
"3.13",
"3.14"]

runs-on: ${{ matrix.platform }}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: "3.12"

- name: Update requirements
- name: Install build tools
run: |
python -m pip install --upgrade pip
pip install pybind11 setuptools wheel twine auditwheel
python -m pip install cibuildwheel twine

- name: Build and install for linux
- name: Build linux wheels
env:
CIBW_BUILD: "cp38-* cp39-* cp310-* cp311-* cp312-* cp313-*"
CIBW_SKIP: "*-musllinux_*"
CIBW_ARCHS_LINUX: "x86_64"
run: |
python -m cibuildwheel --output-dir wheelhouse python

- name: Check wheels
run: |
cd python
python setup.py bdist_wheel --plat-name manylinux2014_x86_64
auditwheel repair dist/*.whl --wheel-dir auditwheel_dist
twine check wheelhouse/*

- name: Upload to pypi when release
if: github.event_name == 'release' && github.event.action == 'published'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PYCGRAPH_TOKEN }}
run: |
cd python
twine check dist/*
twine upload --verbose --skip-existing dist/*
twine upload --verbose --skip-existing wheelhouse/*
3 changes: 3 additions & 0 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
@Desc:
"""

import sys
import glob
from setuptools import setup, Extension
import pybind11
Expand Down Expand Up @@ -33,10 +34,12 @@
"-fvisibility=hidden"]
_include_dirs = [pybind11.get_include(),
"../src"]
_extra_link_args = ["-pthread"] if sys.platform != "win32" else []
_ext_modules = [
Extension(
name=__PYCGRAPH_NAME__,
sources=_sources,
extra_link_args=_extra_link_args,
extra_compile_args=_extra_compile_args,
include_dirs=_include_dirs,
),
Expand Down
Loading