Skip to content

Commit

Permalink
direct call of setup.py is deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
mdevaev committed Mar 22, 2024
1 parent 847f34e commit 25957de
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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-*
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion pkg/arch/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions python/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include setup.py
recursive-include src *.c *h
8 changes: 5 additions & 3 deletions python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ def _find_sources(suffix: str) -> list[str]:
extra_compile_args=["-std=c17", "-D_GNU_SOURCE"],
undef_macros=["NDEBUG"],
sources=_find_sources(".c"),
depends=_find_sources(".h"),
),
],
)

0 comments on commit 25957de

Please sign in to comment.