Skip to content

Commit 0828318

Browse files
authored
Merge pull request #1 from mharshe/fixup-project-for-compilation
Remove members that do not exist in rocksdb. Update configuration
2 parents b09121d + 9b2d7a9 commit 0828318

File tree

5 files changed

+19
-30
lines changed

5 files changed

+19
-30
lines changed

Dockerfile

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:18.04
1+
FROM ubuntu:20.04
22
ENV SRC /home/tester/src
33
ENV DEBIAN_FRONTEND noninteractive
44

@@ -10,7 +10,7 @@ RUN apt-get update -y && apt-get install -qy \
1010
python3 \
1111
python-dev \
1212
python3-dev \
13-
python-pip \
13+
python3-pip \
1414
librocksdb-dev \
1515
libsnappy-dev \
1616
zlib1g-dev \
@@ -24,10 +24,19 @@ RUN update-locale
2424
RUN locale-gen $LANG
2525

2626
#NOTE(sileht): Upgrade python dev tools
27-
RUN pip install -U pip tox virtualenv
27+
RUN pip3 install -U pip tox virtualenv setuptools pytest Cython
2828

29-
RUN groupadd --gid 2000 tester
30-
RUN useradd --uid 2000 --gid 2000 --create-home --shell /bin/bash tester
31-
USER tester
29+
# Set username same as generic default username. Allows output build to be available to same user
30+
ENV USER_NAME ubuntu
3231

33-
WORKDIR $SRC
32+
ARG host_uid=1001
33+
ARG host_gid=1001
34+
RUN groupadd -g $host_gid $USER_NAME && \
35+
useradd -g $host_gid -m -s /bin/bash -u $host_uid $USER_NAME
36+
37+
USER $USER_NAME
38+
39+
ENV BUILD_INPUT_DIR /home/$USER_NAME/workspace
40+
RUN mkdir -p $BUILD_INPUT_DIR
41+
42+
WORKDIR $BUILD_INPUT_DIR

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[build-system]
2-
requires = ["setuptools", "wheel"]
2+
requires = ["setuptools", "wheel", "cython"]
33
build-backend = "setuptools.build_meta"

rocksdb/_rocksdb.pyx

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,6 @@ cdef class BlockBasedTableFactory(PyTableFactory):
590590
block_size_deviation=None,
591591
block_restart_interval=None,
592592
whole_key_filtering=None,
593-
enable_index_compression=None,
594593
cache_index_and_filter_blocks=None,
595594
format_version=None,
596595
):
@@ -643,12 +642,6 @@ cdef class BlockBasedTableFactory(PyTableFactory):
643642
else:
644643
table_options.whole_key_filtering = False
645644

646-
if enable_index_compression is not None:
647-
if enable_index_compression:
648-
table_options.enable_index_compression = True
649-
else:
650-
table_options.enable_index_compression = False
651-
652645
if cache_index_and_filter_blocks is not None:
653646
if cache_index_and_filter_blocks:
654647
table_options.cache_index_and_filter_blocks = True
@@ -1365,12 +1358,6 @@ cdef class Options(ColumnFamilyOptions):
13651358
def __set__(self, value):
13661359
self.opts.max_background_compactions = value
13671360

1368-
property stats_history_buffer_size:
1369-
def __get__(self):
1370-
return self.opts.stats_history_buffer_size
1371-
def __set__(self, value):
1372-
self.opts.stats_history_buffer_size = value
1373-
13741361
property max_background_jobs:
13751362
def __get__(self):
13761363
return self.opts.max_background_jobs

setup.cfg

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ package_dir =
2929
rocksdb = rocksdb
3030
include_package_data = True
3131
zip_safe = False
32-
setup_requires =
33-
cython >= 0.20
34-
setuptools >= 25
3532
install_requires =
3633
setuptools >= 25
3734
test_require =

tox.ini

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
[tox]
22
envlist = py35,py36,py37,py38,py39
33
minversion = 2.0
4-
skipsdist = True
54

65
[testenv]
7-
#skip_install = True
8-
#deps =
9-
# -e
10-
# .[test]
11-
commands = pytest-3 {posargs:rocksdb/tests}
6+
deps = pytest
7+
commands = pytest {posargs:rocksdb/tests}
128

139
[testenv:docs]
1410
deps = .[doc]

0 commit comments

Comments
 (0)