direct call of setup.py is deprecated

This commit is contained in:
Maxim Devaev 2024-03-22 15:53:41 +02:00
parent 847f34e10c
commit 25957de017
6 changed files with 11 additions and 7 deletions

3
.gitignore vendored
View File

@ -3,8 +3,9 @@
/pkg/arch/pkg/
/pkg/arch/src/
/src/build/
/python/build/
/python/dist/
/python/ustreamer.egg-info/
/python/root/
/janus/build/
/ustreamer
/ustreamer-*

View File

@ -45,7 +45,7 @@ apps:
python:
$(MAKE) -C python
$(ECHO) ln -sf python/build/lib.*/*.so .
$(ECHO) ln -sf python/root/usr/lib/python*/site-packages/*.so .
janus:

View File

@ -19,7 +19,7 @@ _options="WITH_GPIO=1 WITH_SYSTEMD=1"
if [ -e /usr/bin/python3 ]; then
_options="$_options WITH_PYTHON=1"
depends+=(python)
makedepends+=(python-setuptools)
makedepends+=(python-setuptools python-pip python-build)
fi
if [ -e /usr/include/janus/plugins/plugin.h ];then
depends+=(janus-gateway alsa-lib opus)

2
python/MANIFEST.in Normal file
View File

@ -0,0 +1,2 @@
include setup.py
recursive-include src *.c *h

View File

@ -9,12 +9,14 @@ PY ?= python3
# =====
all:
$(info == PY_BUILD ustreamer-*.so)
$(ECHO) $(PY) setup.py build
rm -rf root
$(ECHO) $(PY) -m build --skip-dependency-check --no-isolation
$(ECHO) $(PY) -m pip install dist/*.whl --ignore-installed --root=./root
install:
$(PY) setup.py install --prefix=$(PREFIX) --root=$(if $(R_DESTDIR),$(R_DESTDIR),/)
$(PY) -m pip install dist/*.whl --ignore-installed --prefix=$(PREFIX) --root=$(if $(R_DESTDIR),$(R_DESTDIR),/)
clean:
rm -rf build ustreamer.egg-info
rm -rf root dist ustreamer.egg-info

View File

@ -29,7 +29,6 @@ if __name__ == "__main__":
extra_compile_args=["-std=c17", "-D_GNU_SOURCE"],
undef_macros=["NDEBUG"],
sources=_find_sources(".c"),
depends=_find_sources(".h"),
),
],
)