diff --git a/Dockerfile b/Dockerfile index a7adbc4..c2662af 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 +FROM ubuntu:20.04 ENV SRC /home/tester/src ENV DEBIAN_FRONTEND noninteractive @@ -10,7 +10,7 @@ RUN apt-get update -y && apt-get install -qy \ python3 \ python-dev \ python3-dev \ - python-pip \ + python3-pip \ librocksdb-dev \ libsnappy-dev \ zlib1g-dev \ @@ -24,10 +24,19 @@ RUN update-locale RUN locale-gen $LANG #NOTE(sileht): Upgrade python dev tools -RUN pip install -U pip tox virtualenv +RUN pip3 install -U pip tox virtualenv setuptools pytest Cython -RUN groupadd --gid 2000 tester -RUN useradd --uid 2000 --gid 2000 --create-home --shell /bin/bash tester -USER tester +# Set username same as generic default username. Allows output build to be available to same user +ENV USER_NAME ubuntu -WORKDIR $SRC +ARG host_uid=1001 +ARG host_gid=1001 +RUN groupadd -g $host_gid $USER_NAME && \ + useradd -g $host_gid -m -s /bin/bash -u $host_uid $USER_NAME + +USER $USER_NAME + +ENV BUILD_INPUT_DIR /home/$USER_NAME/workspace +RUN mkdir -p $BUILD_INPUT_DIR + +WORKDIR $BUILD_INPUT_DIR diff --git a/pyproject.toml b/pyproject.toml index 9787c3b..6d1b4c5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,3 @@ [build-system] -requires = ["setuptools", "wheel"] +requires = ["setuptools", "wheel", "cython"] build-backend = "setuptools.build_meta" diff --git a/rocksdb/_rocksdb.pyx b/rocksdb/_rocksdb.pyx index 7a6c61a..618586e 100644 --- a/rocksdb/_rocksdb.pyx +++ b/rocksdb/_rocksdb.pyx @@ -590,7 +590,6 @@ cdef class BlockBasedTableFactory(PyTableFactory): block_size_deviation=None, block_restart_interval=None, whole_key_filtering=None, - enable_index_compression=None, cache_index_and_filter_blocks=None, format_version=None, ): @@ -643,12 +642,6 @@ cdef class BlockBasedTableFactory(PyTableFactory): else: table_options.whole_key_filtering = False - if enable_index_compression is not None: - if enable_index_compression: - table_options.enable_index_compression = True - else: - table_options.enable_index_compression = False - if cache_index_and_filter_blocks is not None: if cache_index_and_filter_blocks: table_options.cache_index_and_filter_blocks = True @@ -1365,12 +1358,6 @@ cdef class Options(ColumnFamilyOptions): def __set__(self, value): self.opts.max_background_compactions = value - property stats_history_buffer_size: - def __get__(self): - return self.opts.stats_history_buffer_size - def __set__(self, value): - self.opts.stats_history_buffer_size = value - property max_background_jobs: def __get__(self): return self.opts.max_background_jobs diff --git a/setup.cfg b/setup.cfg index 941785c..154eaa1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -29,9 +29,6 @@ package_dir = rocksdb = rocksdb include_package_data = True zip_safe = False -setup_requires = - cython >= 0.20 - setuptools >= 25 install_requires = setuptools >= 25 test_require = diff --git a/tox.ini b/tox.ini index 917b6ee..a25ec96 100644 --- a/tox.ini +++ b/tox.ini @@ -1,14 +1,10 @@ [tox] envlist = py35,py36,py37,py38,py39 minversion = 2.0 -skipsdist = True [testenv] -#skip_install = True -#deps = -# -e -# .[test] -commands = pytest-3 {posargs:rocksdb/tests} +deps = pytest +commands = pytest {posargs:rocksdb/tests} [testenv:docs] deps = .[doc]