manimino / ducks Goto Github PK
View Code? Open in Web Editor NEWIndexes your Python objects for fast lookup by their attributes.
License: MIT License
Indexes your Python objects for fast lookup by their attributes.
License: MIT License
python --version Python 3.10.6
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Input In [8], in <cell line: 1>()
----> 1 from ducks import Dex
File ~/.pyenv/versions/3.10.6/envs/infra-api/lib/python3.10/site-packages/ducks/__init__.py:2, in <module>
1 from ducks.constants import ANY
----> 2 from ducks.concurrent.main import ConcurrentDex, FAIR, READERS, WRITERS
3 from ducks.exceptions import MissingAttribute
4 from ducks.frozen.main import FrozenDex
File ~/.pyenv/versions/3.10.6/envs/infra-api/lib/python3.10/site-packages/ducks/concurrent/main.py:6, in <module>
2 from typing import Any, List, Union, Iterable, Callable, Iterator, Optional, Dict
4 from readerwriterlock.rwlock import RWLockRead, RWLockWrite, RWLockFair
----> 6 from ducks.mutable.main import Dex
7 from contextlib import contextmanager
10 """Lock priority options"""
File ~/.pyenv/versions/3.10.6/envs/infra-api/lib/python3.10/site-packages/ducks/mutable/main.py:14, in <module>
5 from cykhash import Int64Set
7 from ducks.utils import (
8 cyk_intersect,
9 cyk_union,
(...)
12 validate_query,
13 )
---> 14 from ducks.mutable.mutable_attr import MutableAttrIndex
17 class Dex:
19 def __init__(
20 self,
21 objs: Optional[Iterable[Any]] = None,
22 on: Iterable[Union[str, Callable]] = None,
23 ):
File ~/.pyenv/versions/3.10.6/envs/infra-api/lib/python3.10/site-packages/ducks/mutable/mutable_attr.py:8, in <module>
6 from ducks.constants import ANY, ARR_TYPE, ARRAY_SIZE_MAX, SET_SIZE_MIN
7 from ducks.utils import get_attribute
----> 8 from ducks.btree import BTree
11 class MutableAttrIndex:
12 """Stores data and handles requests that are relevant to a single attribute of a Dex."""
File ~/.pyenv/versions/3.10.6/envs/infra-api/lib/python3.10/site-packages/ducks/btree.py:1, in <module>
----> 1 from BTrees.OOBTree import OOBTree
3 from typing import List, Dict, Any, Tuple
6 class BTree:
ModuleNotFoundError: No module named 'BTrees'```
Is your feature request related to a problem? Please describe.
Using Python 3.12 cannot install the ducks package
Describe the solution you'd like
Indexing feature is very nice to have
Describe alternatives you've considered
None
Additional context
N/A
Describe the bug
I am trying to get ducks
to install in a Docker for AWS Lambda, I see this error during the build process. The Docker image being used here is this lambda/python:3.9-x86_64
found here https://gallery.ecr.aws/lambda/python.
#7 31.42 × Building wheel for cykhash (pyproject.toml) did not run successfully.
#7 31.42 │ exit code: 1
#7 31.42 ╰─> [53 lines of output]
#7 31.42 running bdist_wheel
#7 31.42 running build
#7 31.42 running build_py
#7 31.42 creating build
#7 31.42 creating build/lib.linux-x86_64-cpython-39
#7 31.42 creating build/lib.linux-x86_64-cpython-39/cykhash
#7 31.42 copying src/cykhash/compat.py -> build/lib.linux-x86_64-cpython-39/cykhash
#7 31.42 copying src/cykhash/__init__.py -> build/lib.linux-x86_64-cpython-39/cykhash
#7 31.42 running egg_info
#7 31.42 writing src/cykhash.egg-info/PKG-INFO
#7 31.42 writing dependency_links to src/cykhash.egg-info/dependency_links.txt
#7 31.42 writing top-level names to src/cykhash.egg-info/top_level.txt
#7 31.42 reading manifest file 'src/cykhash.egg-info/SOURCES.txt'
#7 31.42 reading manifest template 'MANIFEST.in'
#7 31.42 adding license file 'LICENSE'
#7 31.42 writing manifest file 'src/cykhash.egg-info/SOURCES.txt'
#7 31.42 copying src/cykhash/common.pxi -> build/lib.linux-x86_64-cpython-39/cykhash
#7 31.42 copying src/cykhash/floatdef.pxd -> build/lib.linux-x86_64-cpython-39/cykhash
#7 31.42 copying src/cykhash/hash_functions.pxi -> build/lib.linux-x86_64-cpython-39/cykhash
#7 31.42 copying src/cykhash/khash.pxi -> build/lib.linux-x86_64-cpython-39/cykhash
#7 31.42 copying src/cykhash/khashmaps.pxd -> build/lib.linux-x86_64-cpython-39/cykhash
#7 31.42 copying src/cykhash/khashmaps.pyx -> build/lib.linux-x86_64-cpython-39/cykhash
#7 31.42 copying src/cykhash/khashsets.pxd -> build/lib.linux-x86_64-cpython-39/cykhash
#7 31.42 copying src/cykhash/khashsets.pyx -> build/lib.linux-x86_64-cpython-39/cykhash
#7 31.42 copying src/cykhash/memory.pxi -> build/lib.linux-x86_64-cpython-39/cykhash
#7 31.42 copying src/cykhash/murmurhash.pxi -> build/lib.linux-x86_64-cpython-39/cykhash
#7 31.42 copying src/cykhash/unique.pxd -> build/lib.linux-x86_64-cpython-39/cykhash
#7 31.42 copying src/cykhash/unique.pyx -> build/lib.linux-x86_64-cpython-39/cykhash
#7 31.42 copying src/cykhash/utils.pyx -> build/lib.linux-x86_64-cpython-39/cykhash
#7 31.42 creating build/lib.linux-x86_64-cpython-39/cykhash/unique
#7 31.42 copying src/cykhash/unique/unique_impl.pxi.in -> build/lib.linux-x86_64-cpython-39/cykhash/unique
#7 31.42 creating build/lib.linux-x86_64-cpython-39/cykhash/sets
#7 31.42 copying src/cykhash/sets/set_init.pxi.in -> build/lib.linux-x86_64-cpython-39/cykhash/sets
#7 31.42 copying src/cykhash/sets/set_impl.pxi.in -> build/lib.linux-x86_64-cpython-39/cykhash/sets
#7 31.42 copying src/cykhash/sets/set_header.pxi.in -> build/lib.linux-x86_64-cpython-39/cykhash/sets
#7 31.42 creating build/lib.linux-x86_64-cpython-39/cykhash/maps
#7 31.42 copying src/cykhash/maps/map_header.pxi.in -> build/lib.linux-x86_64-cpython-39/cykhash/maps
#7 31.42 copying src/cykhash/maps/map_impl.pxi.in -> build/lib.linux-x86_64-cpython-39/cykhash/maps
#7 31.42 copying src/cykhash/maps/map_init.pxi.in -> build/lib.linux-x86_64-cpython-39/cykhash/maps
#7 31.42 copying src/cykhash/unique/unique_impl.pxi -> build/lib.linux-x86_64-cpython-39/cykhash/unique
#7 31.42 copying src/cykhash/sets/set_header.pxi -> build/lib.linux-x86_64-cpython-39/cykhash/sets
#7 31.42 copying src/cykhash/sets/set_impl.pxi -> build/lib.linux-x86_64-cpython-39/cykhash/sets
#7 31.42 copying src/cykhash/sets/set_init.pxi -> build/lib.linux-x86_64-cpython-39/cykhash/sets
#7 31.42 copying src/cykhash/maps/map_header.pxi -> build/lib.linux-x86_64-cpython-39/cykhash/maps
#7 31.42 copying src/cykhash/maps/map_impl.pxi -> build/lib.linux-x86_64-cpython-39/cykhash/maps
#7 31.42 copying src/cykhash/maps/map_init.pxi -> build/lib.linux-x86_64-cpython-39/cykhash/maps
#7 31.42 running build_ext
#7 31.42 building 'cykhash.khashsets' extension
#7 31.42 creating build/temp.linux-x86_64-cpython-39
#7 31.42 creating build/temp.linux-x86_64-cpython-39/src
#7 31.42 creating build/temp.linux-x86_64-cpython-39/src/cykhash
#7 31.42 gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/var/lang/include/python3.9 -c src/cykhash/khashsets.c -o build/temp.linux-x86_64-cpython-39/src/cykhash/khashsets.o
#7 31.42 error: command 'gcc' failed: No such file or directory
#7 31.42 [end of output]
To Reproduce
Steps to reproduce the behavior:
requirements.txt
with ducks
FROM public.ecr.aws/lambda/python:3.9-x86_64
COPY requirements.txt .
RUN pip3 install -r requirements.txt --target "${LAMBDA_TASK_ROOT}"
Expected behavior
The installation to work properly.
Desktop (please complete the following information):
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.