Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve python bindings build/install flow #460

Merged
merged 1 commit into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install PyYAML
pip install build PyYAML
- name: Build BLST
run: |
cd src
Expand Down Expand Up @@ -60,9 +60,9 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install PyYAML
pip install build PyYAML
- name: Build sdist
run: python setup.py sdist
run: python -m build --sdist
- name: Set up Visual Studio shell
if: runner.os == 'Windows'
uses: egor-tensin/vs-shell@v2
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ analysis-report/
__pycache__
.DS_Store

# python build
*dist/
*ckzg.egg-info/

# nimble build dir
build/

Expand Down
9 changes: 5 additions & 4 deletions bindings/python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
all: install test

.PHONY: install
install: ../../setup.py ckzg.c
python3 ../../setup.py install --force
install: $(CURDIR)/../../setup.py $(CURDIR)/ckzg.c
python3 -m build --skip-dependency-check --outdir $(CURDIR)/dist $(CURDIR)/../../
python3 -m pip install $(CURDIR)/dist/*.whl --force-reinstall

.PHONY: test
test: tests.py
python3 $<
test: $(CURDIR)/tests.py
python3 $<
Loading