Skip to content

Commit f43f3db

Browse files
authored
fix: missing build dependency (#27)
* feat: add pyproject.toml for build system configuration * bump version to 0.7.2 * deprecate setup.py command * fix: use build to build source-only distribution * fix: add numpy to build requirements
1 parent 8f5b271 commit f43f3db

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

.github/workflows/python-package.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,11 @@ jobs:
5252
export CXX=$(brew --prefix llvm@15)/bin/clang++
5353
export LDFLAGS="-L/usr/local/opt/libomp/lib"
5454
export CPPFLAGS="-I/usr/local/opt/libomp/include"
55-
python setup.py build
56-
find build/ -name "_C*.so" -exec cp {} ./torchlpc/ \;
55+
python -m pip install -e .
5756
- name: Build CPP extension with g++
5857
if: matrix.os == 'ubuntu-latest'
5958
run: |
60-
python setup.py build
61-
find build/ -name "_C*.so" -exec cp {} ./torchlpc/ \;
59+
python -m pip install -e .
6260
- name: Test with pytest
6361
run: |
6462
pytest

.github/workflows/python-publish.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,9 @@ jobs:
3333
- name: Install dependencies
3434
run: |
3535
python -m pip install --upgrade pip
36-
pip install setuptools numpy
37-
pip install torch --index-url https://download.pytorch.org/whl/cpu
36+
pip install setuptools build
3837
- name: Build package
39-
run: python setup.py sdist
38+
run: python -m build --sdist
4039
- name: Publish package
4140
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
4241
with:

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["setuptools", "torch", "numpy"]
3+
build-backend = "setuptools.build_meta"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
)
1111

1212
library_name = "torchlpc"
13-
VERSION = "0.7.1"
13+
VERSION = "0.7.2"
1414
MAINTAINER = "Chin-Yun Yu"
1515
EMAIL = "chin-yun.yu@qmul.ac.uk"
1616

0 commit comments

Comments
 (0)