mirror of
https://github.com/markqvist/LXST
synced 2026-11-22 23:10:31 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7794313202 | ||
|
|
a470dca73e | ||
|
|
906b3612d3 | ||
|
|
eefc35c2f8 | ||
|
|
55065d3ec3 |
No files matched your search
@@ -0,0 +1,135 @@
|
||||
# .github/workflows/build-platforms.yml
|
||||
name: Build Windows and macOS binaries
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, master ]
|
||||
tags: [ 'libs*' ]
|
||||
pull_request:
|
||||
branches: [ main, master ]
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
build_windows:
|
||||
name: Build Windows wheels (Python ${{ matrix.python-version }})
|
||||
runs-on: windows-2022
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.11", "3.12", "3.13", "3.14"]
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install cffi wheel setuptools
|
||||
|
||||
- name: Build wheel
|
||||
run: |
|
||||
python setup.py bdist_wheel
|
||||
|
||||
- name: Upload wheel artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: windows-wheels-${{ matrix.python-version }}
|
||||
path: dist/*.whl
|
||||
|
||||
build_macos_x86_64:
|
||||
name: Build macOS x86_64 wheels (Python ${{ matrix.python-version }})
|
||||
runs-on: macos-13 # Platform for macOS Intel
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.11", "3.12", "3.13", "3.14"]
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install cffi wheel setuptools
|
||||
|
||||
- name: Build wheel
|
||||
run: |
|
||||
python setup.py bdist_wheel
|
||||
|
||||
- name: Upload wheel artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: macos-x86_64-wheels-${{ matrix.python-version }}
|
||||
path: dist/*.whl
|
||||
|
||||
# MACOS BUILDS (Apple Silicon ARM64)
|
||||
build_macos_arm64:
|
||||
name: Build macOS ARM64 wheels (Python ${{ matrix.python-version }})
|
||||
runs-on: macos-14 # Platform for macOS ARM
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.11", "3.12", "3.13", "3.14"]
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install cffi wheel setuptools
|
||||
|
||||
- name: Build wheel
|
||||
run: |
|
||||
python setup.py bdist_wheel
|
||||
|
||||
- name: Upload wheel artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: macos-arm64-wheels-${{ matrix.python-version }}
|
||||
path: dist/*.whl
|
||||
|
||||
collect_artifacts:
|
||||
name: Collect all wheels
|
||||
needs: [build_windows, build_macos_x86_64, build_macos_arm64]
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'release' && github.event.action == 'published'
|
||||
steps:
|
||||
- name: Download all artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: ./artifacts
|
||||
|
||||
- name: List all files
|
||||
run: |
|
||||
find ./artifacts -type f
|
||||
|
||||
- name: Create combined wheel directory
|
||||
run: |
|
||||
mkdir -p ./final_wheels
|
||||
find ./artifacts -name "*.whl" -exec cp {} ./final_wheels/ \;
|
||||
find ./artifacts -name "*.tar.gz" -exec cp {} ./final_wheels/ \;
|
||||
|
||||
- name: Upload to GitHub Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
files: ./final_wheels/*
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -0,0 +1 @@
|
||||
void PyInit_filterlib(void) { }
|
||||
@@ -2,7 +2,7 @@ all: release
|
||||
|
||||
clean:
|
||||
@echo Cleaning...
|
||||
-sudo rm -rf ./build
|
||||
-rm -rf ./build
|
||||
-rm -rf ./dist
|
||||
-rm -r ./LXST/__pycache__
|
||||
|
||||
@@ -19,19 +19,20 @@ create_symlinks:
|
||||
-ln -s ../LXST/ ./examples/LXST
|
||||
|
||||
build_wheel:
|
||||
cp ./lib/0.4.2/* ./LXST/
|
||||
cp ./lib/static/* ./LXST/
|
||||
touch ./skip_extensions
|
||||
python3 setup.py sdist bdist_wheel
|
||||
-(rm ./LXST/*.so)
|
||||
-(rm ./LXST/*.dll)
|
||||
-(rm ./LXST/*.dylib)
|
||||
rm ./skip_extensions
|
||||
-@(rm ./LXST/*.so)
|
||||
-@(rm ./LXST/*.dll)
|
||||
|
||||
native_libs:
|
||||
./march_build.sh
|
||||
|
||||
persist_libs:
|
||||
-cp ./libs/dev/*.so ./libs/static/
|
||||
-cp ./libs/dev/*.dll ./libs/static/
|
||||
-cp ./libs/dev/*.dylib ./libs/static/
|
||||
-cp ./lib/dev/*.so ./lib/static/
|
||||
-cp ./lib/dev/*.dll ./lib/static/
|
||||
-cp ./lib/dev/*.dylib ./lib/static/
|
||||
|
||||
release: remove_symlinks build_wheel create_symlinks
|
||||
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
BIN
Binary file not shown.
+6
-5
@@ -1,12 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
docker run --rm -v $(pwd):/io quay.io/pypa/manylinux_2_34_x86_64 /io/build_wheels.sh
|
||||
docker run --rm -v $(pwd):/io quay.io/pypa/musllinux_1_2_x86_64 /io/build_wheels.sh
|
||||
docker run --rm -v $(pwd):/io quay.io/pypa/manylinux_2_31_armv7l /io/build_wheels.sh
|
||||
docker run --rm -v $(pwd):/io quay.io/pypa/manylinux_2_34_aarch64 /io/build_wheels.sh
|
||||
docker run --rm -v $(pwd):/io quay.io/pypa/manylinux_2_39_riscv64 /io/build_wheels.sh
|
||||
docker run --rm -v $(pwd):/io quay.io/pypa/musllinux_1_2_aarch64 /io/build_wheels.sh
|
||||
docker run --rm -v $(pwd):/io quay.io/pypa/musllinux_1_2_armv7l /io/build_wheels.sh
|
||||
docker run --rm -v $(pwd):/io quay.io/pypa/musllinux_1_2_riscv64 /io/build_wheels.sh
|
||||
|
||||
# docker run --rm -v $(pwd):/io quay.io/pypa/manylinux_2_31_armv7l /io/build_wheels.sh
|
||||
# docker run --rm -v $(pwd):/io quay.io/pypa/musllinux_1_2_x86_64 /io/build_wheels.sh
|
||||
# docker run --rm -v $(pwd):/io quay.io/pypa/musllinux_1_2_aarch64 /io/build_wheels.sh
|
||||
# docker run --rm -v $(pwd):/io quay.io/pypa/musllinux_1_2_armv7l /io/build_wheels.sh
|
||||
# docker run --rm -v $(pwd):/io quay.io/pypa/musllinux_1_2_riscv64 /io/build_wheels.sh
|
||||
|
||||
./fetch_libs.sh
|
||||
@@ -4,12 +4,19 @@ from setuptools.command.build_ext import build_ext
|
||||
import os
|
||||
import platform
|
||||
|
||||
BUILD_EXTENSIONS = True
|
||||
if os.path.isfile("./skip_extensions"): BUILD_EXTENSIONS = False
|
||||
else: BUILD_EXTENSIONS = True
|
||||
|
||||
if BUILD_EXTENSIONS: print(f"Building LXST with native extensions...")
|
||||
else: print(f"Building LXST without native extensions...")
|
||||
|
||||
with open("README.md", "r") as fh: long_description = fh.read()
|
||||
exec(open("LXST/_version.py", "r").read())
|
||||
|
||||
if BUILD_EXTENSIONS: extensions = [ Extension("LXST.filterlib", sources=["LXST/Filters.c"], include_dirs=["LXST"], language="c"), ]
|
||||
c_sources = ["LXST/Filters.c"]
|
||||
if os.name == "nt": c_sources.append("LXST/Platforms/windows.c")
|
||||
|
||||
if BUILD_EXTENSIONS: extensions = [ Extension("LXST.filterlib", sources=c_sources, include_dirs=["LXST"], language="c"), ]
|
||||
else: extensions = []
|
||||
|
||||
packages = setuptools.find_packages(exclude=[])
|
||||
|
||||
Reference in new issue
Block a user