Python: Adds lockfile to source archive

pull/190/head
Tpt 3 years ago
parent da315abd44
commit 0147620ec3
  1. 21
      .github/workflows/release.yml
  2. 13
      .github/workflows/tests.yml
  3. 1
      python/Cargo.lock
  4. 3
      python/pyproject.toml

@ -103,7 +103,7 @@ jobs:
- run: rustup update && rustup target add aarch64-apple-darwin - run: rustup update && rustup target add aarch64-apple-darwin
- run: pip install maturin - run: pip install maturin
- run: sed -i 's/path="..\/lib", //g' python/Cargo.toml - run: sed -i 's/path="..\/lib", //g' python/Cargo.toml
- run: maturin build --release -m python/Cargo.toml --universal2 - run: maturin build --release --no-sdist --universal2 -m python/Cargo.toml
- run: maturin build --release --no-sdist -m python/Cargo.toml - run: maturin build --release --no-sdist -m python/Cargo.toml
- uses: pypa/gh-action-pypi-publish@release/v1 - uses: pypa/gh-action-pypi-publish@release/v1
with: with:
@ -138,6 +138,25 @@ jobs:
with: with:
files: target/wheels/* files: target/wheels/*
publish_pypi_stdist:
runs-on: ubuntu-latest
needs: publish_crates
steps:
- uses: actions/checkout@v2
with:
submodules: true
- run: pip install maturin
- run: sed -i 's/path="..\/lib", //g' python/Cargo.toml
- run: maturin sdist -m python/Cargo.toml
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
packages_dir: target/wheels
- uses: softprops/action-gh-release@v1
with:
files: target/wheels/*
publish_npm: publish_npm:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:

@ -89,13 +89,12 @@ jobs:
- uses: actions/setup-python@v2 - uses: actions/setup-python@v2
with: with:
python-version: "3.10" python-version: "3.10"
- run: python -m venv python/venv - run: pip install --upgrade maturin sphinx
- run: source python/venv/bin/activate && pip install --upgrade maturin sphinx - run: maturin sdist -m python/Cargo.toml
- run: source venv/bin/activate && maturin develop - run: pip install target/wheels/*.tar.gz
working-directory: ./python - run: python -m unittest
- run: source ../venv/bin/activate && python -m unittest
working-directory: ./python/tests working-directory: ./python/tests
- run: source ../venv/bin/activate && sphinx-build -M doctest . build - run: sphinx-build -M doctest . build
working-directory: ./python/docs working-directory: ./python/docs
- run: source ../venv/bin/activate && sphinx-build -M html . build - run: sphinx-build -M html . build
working-directory: ./python/docs working-directory: ./python/docs

1
python/Cargo.lock generated

@ -0,0 +1 @@
../Cargo.lock

@ -27,3 +27,6 @@ Documentation = "https://oxigraph.org/pyoxigraph/"
Homepage = "https://oxigraph.org/pyoxigraph/" Homepage = "https://oxigraph.org/pyoxigraph/"
Source = "https://github.com/oxigraph/oxigraph/tree/master/python" Source = "https://github.com/oxigraph/oxigraph/tree/master/python"
Tracker = "https://github.com/oxigraph/oxigraph/issues" Tracker = "https://github.com/oxigraph/oxigraph/issues"
[tool.maturin]
cargo-extra-args = "--frozen"

Loading…
Cancel
Save