Skip to content

Commit

Permalink
Merge pull request openwsn-berkeley#275 from geonnave/make-examples-a…
Browse files Browse the repository at this point in the history
…vailable-to-python

Python: make examples available in sdist
  • Loading branch information
geonnave authored May 17, 2024
2 parents 40f7cd7 + fc4efb9 commit 6510f71
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/python-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
- name: Build source distribution # do this only once
run: |
cd lakers-python
ln -s ../examples ./examples # make sure examples are available in sdist (because examples/coap is in default-members)
maturin build --sdist --out wheelhouse
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'

Expand Down
8 changes: 8 additions & 0 deletions lakers-python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ maturin develop
pytest
```

To deploy:
```bash
# need to make the examples folder available for the python package,
# because it is listed as one of the workspace's default-members
ln -s ../examples ./examples
MATURIN_PYPI_TOKEN=<your pypi token here> maturin publish
```

## Requirements

The maturin executable must be available. The recommended way is to install and use it in a virtual environment:
Expand Down
3 changes: 3 additions & 0 deletions lakers-python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[build-system]
requires = ["maturin>=1.0,<2.0"]
build-backend = "maturin"

[tool.maturin]
include = ["./examples/*"]

0 comments on commit 6510f71

Please sign in to comment.