moved python module

This commit is contained in:
Devaev Maxim
2021-01-21 07:19:10 +03:00
parent 184a4879eb
commit 94383a2d54
6 changed files with 14 additions and 12 deletions

View File

@@ -10,7 +10,7 @@ serialize =
search = VERSION "{current_version}"
replace = VERSION "{new_version}"
[bumpversion:file:src/python/setup.py]
[bumpversion:file:python/setup.py]
search = version="{current_version}"
replace = version="{new_version}"

2
.gitignore vendored
View File

@@ -5,8 +5,8 @@
/pkg/arch/v*.tar.gz
/pkg/arch/ustreamer-*.pkg.tar.xz
/pkg/arch/ustreamer-*.pkg.tar.zst
/src/python/build/
/build/
/python/build/
/config.mk
/vgcore.*
/ustreamer

View File

@@ -7,6 +7,7 @@ PREFIX ?= /usr/local
MANPREFIX ?= $(PREFIX)/share/man
CC ?= gcc
PY ?= python3
CFLAGS ?= -O3 -MD
LDFLAGS ?=
@@ -90,7 +91,7 @@ install: $(USTR) $(DUMP)
gzip -f $(DESTDIR)$(MANPREFIX)/man1/$(USTR).1
gzip -f $(DESTDIR)$(MANPREFIX)/man1/$(DUMP).1
ifneq ($(call optbool,$(WITH_PYTHON)),)
cd src/python && python3 setup.py install --prefix=$(PREFIX) --root=$(if $(DESTDIR),$(DESTDIR),/)
cd python && $(PY) setup.py install --prefix=$(PREFIX) --root=$(if $(DESTDIR),$(DESTDIR),/)
endif
@@ -132,8 +133,9 @@ $(BUILD)/%.o: %.c
python:
ifneq ($(call optbool,$(WITH_PYTHON)),)
cd src/python && python3 setup.py build
ln -sf src/python/build/lib.*/*.so .
$(info == PY_BUILD ustreamer-*.so)
@ cd python && $(PY) setup.py --quiet build
@ ln -sf python/build/lib.*/*.so .
else
@ true
endif
@@ -180,7 +182,7 @@ clean-all: linters clean
-it $(LINTERS_IMAGE) bash -c "cd src && rm -rf linters/{.tox,.mypy_cache}"
clean:
rm -rf pkg/arch/pkg pkg/arch/src pkg/arch/v*.tar.gz pkg/arch/ustreamer-*.pkg.tar.{xz,zst}
rm -rf $(USTR) $(DUMP) $(BUILD) src/python/build vgcore.* *.sock *.so
rm -rf $(USTR) $(DUMP) $(BUILD) python/build vgcore.* *.sock *.so
.PHONY: python linters

View File

@@ -24,26 +24,26 @@ commands = cppcheck \
[testenv:flake8]
whitelist_externals = bash
commands = bash -c 'flake8 --config=linters/flake8.ini tools/*.py' src/python/*.py
commands = bash -c 'flake8 --config=linters/flake8.ini tools/*.py' python/*.py
deps =
flake8
flake8-quotes
[testenv:pylint]
whitelist_externals = bash
commands = bash -c 'pylint --rcfile=linters/pylint.ini --output-format=colorized --reports=no tools/*.py src/python/*.py'
commands = bash -c 'pylint --rcfile=linters/pylint.ini --output-format=colorized --reports=no tools/*.py python/*.py'
deps =
pylint
[testenv:mypy]
whitelist_externals = bash
commands = bash -c 'mypy --config-file=linters/mypy.ini tools/*.py src/python/*.py'
commands = bash -c 'mypy --config-file=linters/mypy.ini tools/*.py python/*.py'
deps =
mypy
[testenv:vulture]
whitelist_externals = bash
commands = bash -c 'vulture tools/*.py src/python/*.py'
commands = bash -c 'vulture tools/*.py python/*.py'
deps =
vulture

View File

@@ -13,8 +13,8 @@
#include <Python.h>
#include "../libs/tools.h" // Just a header without C-sources
#include "../libs/memsinksh.h" // No sources again
#include "../src/libs/tools.h" // Just a header without C-sources
#include "../src/libs/memsinksh.h" // No sources again
typedef struct {