Merge pull request #469 from python-zk/462-virtualenv-continued
chore: stop bundling virtualenv and assorted fixes
This commit is contained in:
commit
f7c871a901
|
@ -27,7 +27,6 @@ site-packages/
|
||||||
zookeeper/
|
zookeeper/
|
||||||
.coverage
|
.coverage
|
||||||
.idea
|
.idea
|
||||||
.pip_cache
|
|
||||||
.project
|
.project
|
||||||
.pydevproject
|
.pydevproject
|
||||||
.tox
|
.tox
|
||||||
|
|
|
@ -4,8 +4,8 @@ addons:
|
||||||
packages:
|
packages:
|
||||||
- libevent-dev
|
- libevent-dev
|
||||||
cache:
|
cache:
|
||||||
|
pip: true
|
||||||
directories:
|
directories:
|
||||||
- "$HOME/.cache/pip"
|
|
||||||
- zookeeper
|
- zookeeper
|
||||||
language: python
|
language: python
|
||||||
python:
|
python:
|
||||||
|
|
10
Makefile
10
Makefile
|
@ -1,15 +1,10 @@
|
||||||
HERE = $(shell pwd)
|
HERE = $(shell pwd)
|
||||||
BIN = $(HERE)/bin
|
BIN = $(HERE)/bin
|
||||||
PYTHON = $(BIN)/python
|
PYTHON = $(BIN)/python
|
||||||
PIP_DOWNLOAD_CACHE ?= $(HERE)/.pip_cache
|
|
||||||
INSTALL = $(BIN)/pip install
|
INSTALL = $(BIN)/pip install
|
||||||
ifneq ($(TRAVIS), true)
|
|
||||||
INSTALL += --download-cache $(PIP_DOWNLOAD_CACHE)
|
|
||||||
endif
|
|
||||||
TOX_VENV ?= py27
|
TOX_VENV ?= py27
|
||||||
BUILD_DIRS = bin build include lib lib64 man share
|
BUILD_DIRS = bin build include lib lib64 man share
|
||||||
|
|
||||||
GEVENT_VERSION ?= 1.0.1
|
|
||||||
PYTHON_EXE = $(shell [ -f $(PYTHON) ] && echo $(PYTHON) || echo python)
|
PYTHON_EXE = $(shell [ -f $(PYTHON) ] && echo $(PYTHON) || echo python)
|
||||||
PYPY = $(shell $(PYTHON_EXE) -c "import sys; print(getattr(sys, 'pypy_version_info', False) and 'yes' or 'no')")
|
PYPY = $(shell $(PYTHON_EXE) -c "import sys; print(getattr(sys, 'pypy_version_info', False) and 'yes' or 'no')")
|
||||||
TRAVIS ?= false
|
TRAVIS ?= false
|
||||||
|
@ -18,9 +13,9 @@ TRAVIS_PYTHON_VERSION ?= $(shell $(PYTHON_EXE) -c "import sys; print('.'.join([s
|
||||||
GREENLET_SUPPORTED = yes
|
GREENLET_SUPPORTED = yes
|
||||||
ifeq ($(findstring 3.,$(TRAVIS_PYTHON_VERSION)), 3.)
|
ifeq ($(findstring 3.,$(TRAVIS_PYTHON_VERSION)), 3.)
|
||||||
GREENLET_SUPPORTED = no
|
GREENLET_SUPPORTED = no
|
||||||
VENV_CMD = python -m venv .
|
VENV_CMD = $(PYTHON_EXE) -m venv .
|
||||||
else
|
else
|
||||||
VENV_CMD = python -m virtualenv .
|
VENV_CMD = $(PYTHON_EXE) -m virtualenv .
|
||||||
endif
|
endif
|
||||||
ifeq ($(PYPY),yes)
|
ifeq ($(PYPY),yes)
|
||||||
GREENLET_SUPPORTED = no
|
GREENLET_SUPPORTED = no
|
||||||
|
@ -37,7 +32,6 @@ build: $(PYTHON)
|
||||||
ifeq ($(GREENLET_SUPPORTED),yes)
|
ifeq ($(GREENLET_SUPPORTED),yes)
|
||||||
$(INSTALL) -U -r requirements_eventlet.txt
|
$(INSTALL) -U -r requirements_eventlet.txt
|
||||||
$(INSTALL) -U -r requirements_gevent.txt
|
$(INSTALL) -U -r requirements_gevent.txt
|
||||||
$(INSTALL) -f https://github.com/surfly/gevent/releases gevent==$(GEVENT_VERSION)
|
|
||||||
endif
|
endif
|
||||||
ifneq ($(TRAVIS), true)
|
ifneq ($(TRAVIS), true)
|
||||||
$(INSTALL) -U -r requirements_sphinx.txt
|
$(INSTALL) -U -r requirements_sphinx.txt
|
||||||
|
|
|
@ -12,15 +12,6 @@ class TestBuildEnvironment(KazooTestCase):
|
||||||
if not os.environ.get('TRAVIS'):
|
if not os.environ.get('TRAVIS'):
|
||||||
raise SkipTest('Only run build config tests on Travis.')
|
raise SkipTest('Only run build config tests on Travis.')
|
||||||
|
|
||||||
def test_gevent_version(self):
|
|
||||||
try:
|
|
||||||
import gevent
|
|
||||||
except ImportError:
|
|
||||||
raise SkipTest('gevent not available.')
|
|
||||||
env_version = os.environ.get('GEVENT_VERSION')
|
|
||||||
if env_version:
|
|
||||||
self.assertEqual(env_version, gevent.__version__)
|
|
||||||
|
|
||||||
def test_zookeeper_version(self):
|
def test_zookeeper_version(self):
|
||||||
server_version = self.client.server_version()
|
server_version = self.client.server_version()
|
||||||
server_version = '.'.join([str(i) for i in server_version])
|
server_version = '.'.join([str(i) for i in server_version])
|
||||||
|
|
Loading…
Reference in New Issue