gwm 3.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- gwm-3.1.2/.github/workflows/wheels.yml +86 -0
- gwm-3.1.2/.gitignore +28 -0
- gwm-3.1.2/CMakeLists.txt +60 -0
- gwm-3.1.2/LICENSE +24 -0
- gwm-3.1.2/LICENSES/LGPL-2.1-or-later.txt +501 -0
- gwm-3.1.2/Makefile +11 -0
- gwm-3.1.2/PKG-INFO +199 -0
- gwm-3.1.2/PUBLISHING.md +72 -0
- gwm-3.1.2/README.md +167 -0
- gwm-3.1.2/dat/mutagen.gsp +20944 -0
- gwm-3.1.2/dat/mutagen_query.gsp +178 -0
- gwm-3.1.2/pyproject.toml +92 -0
- gwm-3.1.2/python/bindings.cpp +208 -0
- gwm-3.1.2/python/gwm/__init__.py +187 -0
- gwm-3.1.2/python/gwm/__main__.py +4 -0
- gwm-3.1.2/python/gwm/_cli.py +68 -0
- gwm-3.1.2/python/gwm/_core.pyi +31 -0
- gwm-3.1.2/python/gwm/py.typed +0 -0
- gwm-3.1.2/python/tests/conftest.py +26 -0
- gwm-3.1.2/python/tests/test_cli.py +44 -0
- gwm-3.1.2/python/tests/test_errors.py +54 -0
- gwm-3.1.2/python/tests/test_golden.py +62 -0
- gwm-3.1.2/python/tests/test_in_memory.py +31 -0
- gwm-3.1.2/python/tests/test_index_bytes.py +37 -0
- gwm-3.1.2/python/tests/test_roundtrip.py +49 -0
- gwm-3.1.2/src/Build.cpp +96 -0
- gwm-3.1.2/src/Graph.cpp +98 -0
- gwm-3.1.2/src/Makefile +32 -0
- gwm-3.1.2/src/Search.cpp +96 -0
- gwm-3.1.2/src/WLKernel.cpp +150 -0
- gwm-3.1.2/src/WLKernel.hpp +117 -0
- gwm-3.1.2/src/gWM.cpp +527 -0
- gwm-3.1.2/src/gWM.hpp +135 -0
- gwm-3.1.2/src/macros.h +26 -0
- gwm-3.1.2/src/popcount.h +15 -0
- gwm-3.1.2/src/rank9sel.cpp +354 -0
- gwm-3.1.2/src/rank9sel.h +95 -0
- gwm-3.1.2/test/bench.sh +33 -0
- gwm-3.1.2/test/golden/build-it2.txt +3 -0
- gwm-3.1.2/test/golden/build-it3.txt +3 -0
- gwm-3.1.2/test/golden/search-q08.txt +11 -0
- gwm-3.1.2/test/golden/search-q09it3.txt +11 -0
- gwm-3.1.2/test/golden/search-self06.txt +681 -0
- gwm-3.1.2/test/regress.sh +43 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
name: Wheels
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
tags: ["v*"]
|
|
7
|
+
pull_request:
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
concurrency:
|
|
11
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
12
|
+
cancel-in-progress: true
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
wheels:
|
|
19
|
+
name: wheels / ${{ matrix.os }}
|
|
20
|
+
runs-on: ${{ matrix.os }}
|
|
21
|
+
strategy:
|
|
22
|
+
fail-fast: false
|
|
23
|
+
matrix:
|
|
24
|
+
include:
|
|
25
|
+
# Linux: native runners, no QEMU cross-build.
|
|
26
|
+
- os: ubuntu-24.04
|
|
27
|
+
- os: ubuntu-24.04-arm
|
|
28
|
+
# macOS: two single-arch runners rather than one universal2 build.
|
|
29
|
+
# macos-15 is pinned (not macos-latest, which has moved to 26) so
|
|
30
|
+
# the arm64 deployment target below doesn't silently drift.
|
|
31
|
+
- os: macos-15-intel
|
|
32
|
+
# cibuildwheel enforces 10.15 as the floor for the Python
|
|
33
|
+
# versions we build here; 10.13 is silently bumped to 10.15 with
|
|
34
|
+
# a warning, so declare the real value instead.
|
|
35
|
+
macosx_deployment_target: "10.15"
|
|
36
|
+
- os: macos-15
|
|
37
|
+
macosx_deployment_target: "11.0"
|
|
38
|
+
steps:
|
|
39
|
+
- uses: actions/checkout@v4
|
|
40
|
+
|
|
41
|
+
- name: Build wheels
|
|
42
|
+
uses: pypa/cibuildwheel@v4.1.0
|
|
43
|
+
env:
|
|
44
|
+
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macosx_deployment_target }}
|
|
45
|
+
|
|
46
|
+
- uses: actions/upload-artifact@v4
|
|
47
|
+
with:
|
|
48
|
+
name: wheels-${{ matrix.os }}
|
|
49
|
+
path: wheelhouse/*.whl
|
|
50
|
+
|
|
51
|
+
sdist:
|
|
52
|
+
name: sdist
|
|
53
|
+
runs-on: ubuntu-24.04
|
|
54
|
+
steps:
|
|
55
|
+
- uses: actions/checkout@v4
|
|
56
|
+
- uses: actions/setup-python@v5
|
|
57
|
+
with:
|
|
58
|
+
python-version: "3.x"
|
|
59
|
+
- run: python -m pip install build
|
|
60
|
+
- run: python -m build --sdist
|
|
61
|
+
- uses: actions/upload-artifact@v4
|
|
62
|
+
with:
|
|
63
|
+
name: sdist
|
|
64
|
+
path: dist/*.tar.gz
|
|
65
|
+
|
|
66
|
+
publish:
|
|
67
|
+
name: Publish to PyPI
|
|
68
|
+
needs: [wheels, sdist]
|
|
69
|
+
runs-on: ubuntu-24.04
|
|
70
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
71
|
+
environment:
|
|
72
|
+
name: pypi
|
|
73
|
+
url: https://pypi.org/p/gwm
|
|
74
|
+
permissions:
|
|
75
|
+
id-token: write
|
|
76
|
+
steps:
|
|
77
|
+
- uses: actions/download-artifact@v4
|
|
78
|
+
with:
|
|
79
|
+
pattern: wheels-*
|
|
80
|
+
path: dist
|
|
81
|
+
merge-multiple: true
|
|
82
|
+
- uses: actions/download-artifact@v4
|
|
83
|
+
with:
|
|
84
|
+
name: sdist
|
|
85
|
+
path: dist
|
|
86
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
gwm-3.1.2/.gitignore
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Claude Code local runtime state and project instructions (not published)
|
|
2
|
+
.claude/
|
|
3
|
+
CLAUDE.md
|
|
4
|
+
|
|
5
|
+
# C++ build artifacts (src/Makefile)
|
|
6
|
+
src/*.o
|
|
7
|
+
src/*.d
|
|
8
|
+
src/gwm-build
|
|
9
|
+
src/gwm-search
|
|
10
|
+
src/*.dSYM/
|
|
11
|
+
|
|
12
|
+
# CMake / scikit-build-core out-of-tree builds
|
|
13
|
+
build/
|
|
14
|
+
_skbuild/
|
|
15
|
+
|
|
16
|
+
# Python packaging
|
|
17
|
+
dist/
|
|
18
|
+
wheelhouse/
|
|
19
|
+
*.egg-info/
|
|
20
|
+
python/gwm/_core*.so
|
|
21
|
+
python/gwm/_core*.pyd
|
|
22
|
+
|
|
23
|
+
# Python runtime
|
|
24
|
+
__pycache__/
|
|
25
|
+
*.pyc
|
|
26
|
+
.pytest_cache/
|
|
27
|
+
.venv/
|
|
28
|
+
venv/
|
gwm-3.1.2/CMakeLists.txt
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.18)
|
|
2
|
+
project(gwm VERSION 3.1.2 LANGUAGES CXX)
|
|
3
|
+
|
|
4
|
+
set(CMAKE_CXX_STANDARD 17)
|
|
5
|
+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
6
|
+
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
7
|
+
|
|
8
|
+
if(NOT CMAKE_BUILD_TYPE)
|
|
9
|
+
set(CMAKE_BUILD_TYPE Release)
|
|
10
|
+
endif()
|
|
11
|
+
|
|
12
|
+
include(CheckIPOSupported)
|
|
13
|
+
check_ipo_supported(RESULT GWM_IPO_SUPPORTED OUTPUT _ipo_msg)
|
|
14
|
+
if(GWM_IPO_SUPPORTED)
|
|
15
|
+
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
|
|
16
|
+
endif()
|
|
17
|
+
|
|
18
|
+
# The CLI (make/plain cmake) build is unaffected unless this is turned on.
|
|
19
|
+
option(GWM_BUILD_PYTHON "Build the gwm._core pybind11 extension module" OFF)
|
|
20
|
+
|
|
21
|
+
add_library(gwm_core STATIC
|
|
22
|
+
src/Graph.cpp
|
|
23
|
+
src/WLKernel.cpp
|
|
24
|
+
src/gWM.cpp
|
|
25
|
+
src/rank9sel.cpp
|
|
26
|
+
)
|
|
27
|
+
target_include_directories(gwm_core PUBLIC src)
|
|
28
|
+
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
|
29
|
+
target_compile_options(gwm_core PRIVATE -Wall -Wextra)
|
|
30
|
+
# rank9sel is vendored third-party code (sux); keep its warnings quiet.
|
|
31
|
+
set_source_files_properties(src/rank9sel.cpp PROPERTIES
|
|
32
|
+
COMPILE_OPTIONS "-Wno-sign-compare;-Wno-unused-private-field")
|
|
33
|
+
endif()
|
|
34
|
+
|
|
35
|
+
add_executable(gwm-build src/Build.cpp)
|
|
36
|
+
target_link_libraries(gwm-build PRIVATE gwm_core)
|
|
37
|
+
|
|
38
|
+
add_executable(gwm-search src/Search.cpp)
|
|
39
|
+
target_link_libraries(gwm-search PRIVATE gwm_core)
|
|
40
|
+
|
|
41
|
+
# SKBUILD is set by scikit-build-core: the wheel ships only the _core
|
|
42
|
+
# extension module (below), not these CLI binaries.
|
|
43
|
+
if(NOT SKBUILD)
|
|
44
|
+
install(TARGETS gwm-build gwm-search RUNTIME DESTINATION bin)
|
|
45
|
+
endif()
|
|
46
|
+
|
|
47
|
+
if(GWM_BUILD_PYTHON)
|
|
48
|
+
# gwm_core is a static library; it must be position-independent to be
|
|
49
|
+
# linked into the _core.so extension module.
|
|
50
|
+
set_target_properties(gwm_core PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
|
51
|
+
|
|
52
|
+
find_package(Python 3.9 REQUIRED COMPONENTS Interpreter Development.Module)
|
|
53
|
+
find_package(pybind11 CONFIG REQUIRED)
|
|
54
|
+
|
|
55
|
+
pybind11_add_module(_core python/bindings.cpp)
|
|
56
|
+
target_link_libraries(_core PRIVATE gwm_core)
|
|
57
|
+
target_compile_definitions(_core PRIVATE GWM_VERSION="${PROJECT_VERSION}")
|
|
58
|
+
|
|
59
|
+
install(TARGETS _core LIBRARY DESTINATION gwm)
|
|
60
|
+
endif()
|
gwm-3.1.2/LICENSE
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2013 Yasuo Tabei All Rights Reserved.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person
|
|
6
|
+
obtaining a copy of this software and associated documentation
|
|
7
|
+
files (the "Software"), to deal in the Software without
|
|
8
|
+
restriction, including without limitation the rights to use,
|
|
9
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the
|
|
11
|
+
Software is furnished to do so, subject to the following
|
|
12
|
+
conditions:
|
|
13
|
+
|
|
14
|
+
The above copyright notice and this permission notice shall be
|
|
15
|
+
included in all copies or substantial portions of the Software.
|
|
16
|
+
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
18
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
19
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
20
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
21
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
22
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
23
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
24
|
+
OTHER DEALINGS IN THE SOFTWARE.
|