Skip to content

Commit

Permalink
Merge pull request #1 from mharshe/fixup-project-for-compilation
Browse files Browse the repository at this point in the history
Remove members that do not exist in rocksdb. Update configuration
  • Loading branch information
mharshe authored Nov 11, 2021
2 parents b09121d + 9b2d7a9 commit 0828318
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 30 deletions.
23 changes: 16 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:18.04
FROM ubuntu:20.04
ENV SRC /home/tester/src
ENV DEBIAN_FRONTEND noninteractive

Expand All @@ -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 \
Expand All @@ -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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[build-system]
requires = ["setuptools", "wheel"]
requires = ["setuptools", "wheel", "cython"]
build-backend = "setuptools.build_meta"
13 changes: 0 additions & 13 deletions rocksdb/_rocksdb.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
):
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
8 changes: 2 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -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]
Expand Down

0 comments on commit 0828318

Please sign in to comment.