Upgrades Maturin to 0.11

pull/114/head
Tpt 4 years ago committed by Thomas Tanon
parent c33fe7fab2
commit 5f986f5858
  1. 42
      .github/workflows/build.yml
  2. 2
      .github/workflows/doc.yml
  3. 24
      .github/workflows/release.yml
  4. 18
      python/Cargo.toml
  5. 29
      python/pyproject.toml

@ -15,16 +15,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: rustup update
- run: rustup component add rustfmt
- run: rustup update && rustup component add rustfmt
- run: cargo fmt -- --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: rustup update
- run: rustup component add clippy
- run: rustup update && rustup component add clippy
- run: cargo clippy --all --all-targets --all-features
test:
@ -59,7 +57,7 @@ jobs:
with:
python-version: 3.8
- run: python -m venv python/venv
- run: source python/venv/bin/activate && pip install --upgrade pip 'maturin>=0.9.2,<0.10' sphinx
- run: source python/venv/bin/activate && pip install --upgrade 'maturin>=0.11,<0.12' sphinx
- run: source venv/bin/activate && maturin develop
working-directory: ./python
- run: source ../venv/bin/activate && python -m unittest
@ -69,17 +67,39 @@ jobs:
- run: source ../venv/bin/activate && sphinx-build -M html . build
working-directory: ./python/docs
python_wheel:
runs-on: ${{ matrix.os }}
python_wheel_linux:
runs-on: ubuntu-latest
needs: python
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.6
- run: pip install 'maturin>=0.11,<0.12'
- run: maturin build
working-directory: ./python
python_wheel_mac:
runs-on: macos-latest
needs: python
steps:
- uses: actions/checkout@v2
- run: rustup update && rustup target add aarch64-apple-darwin
- uses: actions/setup-python@v2
with:
python-version: 3.6
- run: pip install 'maturin>=0.11,<0.12'
- run: maturin build --universal2
working-directory: ./python
python_wheel_windows:
runs-on: windows-latest
needs: python
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.6
- run: pip install 'maturin>=0.9.2,<0.10'
- run: pip install 'maturin>=0.11,<0.12'
- run: maturin build
working-directory: ./python

@ -15,7 +15,7 @@ jobs:
with:
python-version: 3.8
- run: python -m venv python/venv
- run: source python/venv/bin/activate && pip install --upgrade pip 'maturin>=0.9.2,<0.10' sphinx
- run: source python/venv/bin/activate && pip install --upgrade 'maturin>=0.11,<0.12' sphinx
- run: source venv/bin/activate && maturin develop
working-directory: ./python
- run: source ../venv/bin/activate && sphinx-build -M doctest . build

@ -85,20 +85,28 @@ jobs:
steps:
- uses: actions/checkout@v2
- run: sed -i 's/path="..\/lib", //g' python/Cargo.toml
- run: docker run --rm -v $(pwd):/io konstin2/maturin:v0.9.4 publish -u __token__ -p ${{ secrets.PYPI_PASSWORD }}
- run: docker run --rm -v $(pwd):/io konstin2/maturin:v0.11.1 publish -u __token__ -p ${{ secrets.PYPI_PASSWORD }}
working-directory: ./python
publish_pypi_mac_windows:
runs-on: ${{ matrix.os }}
publish_pypi_mac:
runs-on: macos-latest
needs: publish_lib_crate
strategy:
matrix:
os: [ macos-latest, windows-latest ]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.6
- run: pip install 'maturin>=0.9.2,<0.10'
- run: pip install 'maturin>=0.11,<0.12'
- run: maturin publish --universal2 --no-sdist -u __token__ -p ${{ secrets.PYPI_PASSWORD }}
working-directory: ./python
publish_pypi_windows:
runs-on: windows-latest
needs: publish_lib_crate
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.6
- run: pip install 'maturin>=0.11,<0.12'
- run: maturin publish --no-sdist -u __token__ -p ${{ secrets.PYPI_PASSWORD }}
working-directory: ./python
publish_npm:
@ -128,7 +136,7 @@ jobs:
with:
python-version: 3.8
- run: python -m venv python/venv
- run: source python/venv/bin/activate && pip install --upgrade pip 'maturin>=0.9.2,<0.10' sphinx
- run: source python/venv/bin/activate && pip install --upgrade 'maturin>=0.11,<0.12' sphinx
- run: source venv/bin/activate && maturin develop
working-directory: ./python
- run: source ../venv/bin/activate && sphinx-build -M doctest . build

@ -19,21 +19,3 @@ doctest = false
oxigraph = {version = "0.2", path="../lib", features = ["sled", "http_client"]}
pyo3 = {version = "0.14", features = ["extension-module", "abi3-py36"]}
native-tls = {version = "0.2", features = ["vendored"]}
[package.metadata.maturin]
classifier = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Rust",
"Topic :: Database :: Database Engines/Servers",
"Topic :: Software Development :: Libraries :: Python Modules",
]
project-url = { Documentation = "https://oxigraph.org/pyoxigraph/", Source = "https://github.com/oxigraph/oxigraph/tree/master/python", Tracker = "https://github.com/oxigraph/oxigraph/issues" }
requires-python = ">=3.6"

@ -1,3 +1,30 @@
[build-system]
requires = ["maturin>=0.9.2,<0.10"]
requires = ["maturin>=0.11,<0.12"]
build-backend = "maturin"
[project]
# Most of the metadata are in Cargo.toml and injected by maturin
name = "pyoxigraph"
classifier = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Rust",
"Topic :: Database :: Database Engines/Servers",
"Topic :: Software Development :: Libraries :: Python Modules",
]
requires-python = ">=3.6"
[project.urls]
changelog = "https://github.com/oxigraph/oxigraph/blob/master/CHANGELOG.md"
documentation = "https://oxigraph.org/pyoxigraph/"
homepage = "https://oxigraph.org/pyoxigraph/"
repository = "https://github.com/oxigraph/oxigraph/tree/master/python"
source = "https://github.com/oxigraph/oxigraph/tree/master/python"
tracker = "https://github.com/oxigraph/oxigraph/issues"

Loading…
Cancel
Save