Skip to content

Commit

Permalink
Merge pull request #460 from jtraglia/better-python-install
Browse files Browse the repository at this point in the history
Improve python bindings build/install flow
  • Loading branch information
asn-d6 authored Jul 24, 2024
2 parents 4ec4285 + 54f636d commit 4fe9508
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
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 $<

0 comments on commit 4fe9508

Please sign in to comment.