diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 32ba3478..5d441512 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index ac4d9ff5..6339db60 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fabfdb58..03efb03a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/python/Cargo.toml b/python/Cargo.toml index 46bad11d..c2377d87 100644 --- a/python/Cargo.toml +++ b/python/Cargo.toml @@ -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" diff --git a/python/pyproject.toml b/python/pyproject.toml index 912a19e9..6b785213 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -1,3 +1,30 @@ [build-system] -requires = ["maturin>=0.9.2,<0.10"] -build-backend = "maturin" \ No newline at end of file +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"