This is an automated email from the git hooks/post-receive script.
teigland pushed a commit to branch master in repository sanlock.
commit e2ff29e3e2a8a036d0d99242af2af23bb1eee19a Author: Nir Soffer nirsof@gmail.com AuthorDate: Fri Apr 12 20:04:17 2019 +0300
python: Unify python extension make command
Replace the python Makefile inplace target with environment variable, fixing the tests after the top Makefile was simplified to use:
$(SUBDIRS): $(MAKE) -C $@
When running tox, we build sanlock extension inside the tox relevant tox environment (e.g. .tox/py27/...). This will be helpful for supporting python 3.
On Travis we still build in the python directory - sanlock import fails if we build it elsewhere. This is not an issue for python 3 since on Travis we have separate build for every python version.
Fixes: 6133e3471ca3 Signed-off-by: Nir Soffer nsoffer@redhat.com --- .travis.yml | 5 ++--- python/Makefile | 5 +---- tox.ini | 4 +--- 3 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/.travis.yml b/.travis.yml index 8cc2859..37643f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ dist: xenial language: python +python: 2.7
addons: apt: @@ -16,8 +17,6 @@ env: - CC="gcc-8"
script: - - make -C wdmd - - make -C src - - make -C python inplace + - make BUILDARGS="--build-lib=." - source tests/env.sh - pytest diff --git a/python/Makefile b/python/Makefile index 06c2201..c97e45a 100644 --- a/python/Makefile +++ b/python/Makefile @@ -5,10 +5,7 @@ # of the GNU General Public License v.2.
all: - python2 setup.py build - -inplace: - python2 setup.py build_ext --inplace + python2 setup.py build $(BUILDARGS)
install: python2 setup.py install --root=$(DESTDIR) diff --git a/tox.ini b/tox.ini index f65f487..1c2349e 100644 --- a/tox.ini +++ b/tox.ini @@ -14,13 +14,11 @@ setenv = LD_LIBRARY_PATH={env:PWD}/wdmd:{env:PWD}/src SANLOCK_PRIVILEGED=0 SANLOCK_RUN_DIR=/tmp/sanlock - PYTHONPATH={env:PWD}/python -sitepackages = True whitelist_externals = make deps = pytest==4.0 commands = - make + make BUILDARGS="--build-lib={envsitepackagesdir}" pytest {posargs}
[pytest]
sanlock-devel@lists.fedorahosted.org