pybit7z 0.1.2__tar.gz → 0.2.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.
- {pybit7z-0.1.2 → pybit7z-0.2.2}/PKG-INFO +8 -8
- {pybit7z-0.1.2 → pybit7z-0.2.2}/README.md +7 -7
- pybit7z-0.2.2/cmake/vcpkg/ports/bit7z/fix_compile_options.patch +13 -0
- pybit7z-0.2.2/cmake/vcpkg/ports/bit7z/fix_dependency.patch +28 -0
- pybit7z-0.2.2/cmake/vcpkg/ports/bit7z/fix_install.patch +43 -0
- pybit7z-0.2.2/cmake/vcpkg/ports/bit7z/portfile.cmake +46 -0
- pybit7z-0.2.2/cmake/vcpkg/ports/bit7z/unofficial-bit7z-config.cmake.in +10 -0
- pybit7z-0.2.2/cmake/vcpkg/ports/bit7z/vcpkg.json +25 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/noxfile.py +11 -1
- {pybit7z-0.1.2 → pybit7z-0.2.2}/src/_core/CMakeLists.txt +8 -6
- {pybit7z-0.1.2 → pybit7z-0.2.2}/src/_core/src/pybind.cpp +13 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/src/pybit7z/_core.pyi +8 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/src/pybit7z/_version.py +2 -2
- {pybit7z-0.1.2 → pybit7z-0.2.2}/vcpkg.json +1 -1
- {pybit7z-0.1.2 → pybit7z-0.2.2}/.clang-format +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/.clang-tidy +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/.copier-answers.yml +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/.cppcheck-suppressions.txt +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/.devcontainer/devcontainer.json +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/.editorconfig +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/.gitattributes +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/.github/codecov.yml +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/.github/codeql-config.yml +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/.github/matchers/pylint.json +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/.github/workflows/cd.yml +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/.github/workflows/ci.yml +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/.github/workflows/codeql.yml +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/.github/workflows/pages.yml +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/.github/workflows/renovate.yml +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/.github/workflows/reuseable_cibuildwheel.yml +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/.github/workflows/semantic-release.yml +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/.gitignore +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/.markdownlint.yaml +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/.pre-commit-config.yaml +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/.releaserc.js +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/.renovaterc.json +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/.vscode/launch.json +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/.vscode/settings.json +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/CMakeLists.txt +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/CMakePresets.json +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/LICENSE +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/ConfigureVersion.cmake +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/ConfigureWarningsAndHardening.cmake +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/presets/arch/x64.json +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/presets/base.json +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/presets/compilers/gcc.json +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/presets/compilers/llvm.json +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/presets/compilers/mingw.json +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/presets/compilers/msvc.json +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/presets/default.json +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/presets/generators/ninja.json +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/presets/os/darwin.json +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/presets/os/linux.json +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/presets/os/windows.json +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/presets/toolchains/vcpkg.json +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/presets/triplets/x64-linux.json +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/presets/triplets/x64-mingw-dynamic.json +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/presets/triplets/x64-mingw-static.json +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/presets/triplets/x64-osx.json +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/presets/triplets/x64-windows.json +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/presets/x64-linux-gcc.json +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/presets/x64-linux-llvm.json +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/presets/x64-mingw-dynamic-windows-mingw.json +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/presets/x64-mingw-static-windows-mingw.json +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/presets/x64-osx-gcc.json +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/presets/x64-osx-llvm.json +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/presets/x64-windows-llvm.json +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/presets/x64-windows-msvc.json +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/vcpkg/bootstrap/vcpkg-config.cmake +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/vcpkg/bootstrap/vcpkg_bootstrap.cmake +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/vcpkg/bootstrap/vcpkg_chainload_toolchain.cmake +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/vcpkg/bootstrap/vcpkg_configure.cmake +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/vcpkg/bootstrap/vcpkg_export_mode.cmake +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/vcpkg/bootstrap/vcpkg_load_triplet.cmake +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/vcpkg/bootstrap/vcpkg_skip_install_on_reconfigure.cmake +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/vcpkg/ports/7zip/7zip-config.cmake.in +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/vcpkg/ports/7zip/CMakeLists.txt +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/vcpkg/ports/7zip/portfile.cmake +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/vcpkg/ports/7zip/vcpkg.json +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/vcpkg/ports/README.md +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/vcpkg/ports/python3/portfile.cmake +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/vcpkg/ports/python3/vcpkg.json +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/vcpkg/scripts/build_type.cmake +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/vcpkg/scripts/toolchains/README.md +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/vcpkg/triplets/README.md +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/vcpkg/vcpkg.toolchain.cmake +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/docs/api/index.md +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/docs/conf.py +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/docs/index.md +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/pyproject.toml +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/src/CMakeLists.txt +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/src/_core/include/_core.hpp +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/src/_core/include/pybit7z.hpp +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/src/_core/src/pybit7z.cpp +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/src/_core/tests/CMakeLists.txt +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/src/_core/tests/test_core.cpp +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/src/_core/tests/test_data/.gitignore +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/src/_core/tests/utils.hpp +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/src/pybit7z/__init__.py +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/src/pybit7z/_version.pyi +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/src/pybit7z/py.typed +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/tests/test_bit7z.py +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/tests/test_compiled.py +0 -0
- {pybit7z-0.1.2 → pybit7z-0.2.2}/tests/test_package.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pybit7z
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: A wrapper based on bit7z.
|
|
5
5
|
Author-Email: "l.feng" <msclock@126.com>
|
|
6
6
|
License: Apache-2.0
|
|
@@ -85,11 +85,11 @@ pip install pybit7z
|
|
|
85
85
|
from pybit7z import core
|
|
86
86
|
|
|
87
87
|
try:
|
|
88
|
-
extractor = core.
|
|
88
|
+
extractor = core.BitFileExtractor(core.FormatSevenZip)
|
|
89
89
|
extractor.extract("path/to/archive.7z", "out/dir/")
|
|
90
90
|
|
|
91
91
|
# Extracting a specific file inside an archive
|
|
92
|
-
extractor.
|
|
92
|
+
extractor.extract_matching("path/to/archive.7z", "file.pdf", "out/dir/")
|
|
93
93
|
|
|
94
94
|
# Extracting the first file of an archive to a buffer
|
|
95
95
|
buffer: bytes = extractor.extract("path/to/archive.7z")
|
|
@@ -108,7 +108,7 @@ from pybit7z import core
|
|
|
108
108
|
|
|
109
109
|
try:
|
|
110
110
|
# Opening the archive
|
|
111
|
-
archive = core.Bit7zArchiveReader("path/to/archive.gz",
|
|
111
|
+
archive = core.Bit7zArchiveReader("path/to/archive.gz", core.FormatGZip)
|
|
112
112
|
|
|
113
113
|
# Testing the archive
|
|
114
114
|
archive.test()
|
|
@@ -147,12 +147,12 @@ try:
|
|
|
147
147
|
compressor.compress_files(files, "protected_archive.zip")
|
|
148
148
|
|
|
149
149
|
# Updating an existing zip archive
|
|
150
|
-
compressor.set_update_mode(core.UpdateMode
|
|
150
|
+
compressor.set_update_mode(core.UpdateMode.Append)
|
|
151
151
|
compressor.compress_files(files, "existing_archive.zip")
|
|
152
152
|
|
|
153
153
|
# Compressing a single file into a buffer
|
|
154
|
-
compressor2 = core.BitFileCompressor(
|
|
155
|
-
buffer: bytes = compressor2.
|
|
154
|
+
compressor2 = core.BitFileCompressor(core.FormatBZip2)
|
|
155
|
+
buffer: bytes = compressor2.compress_file(files[0])
|
|
156
156
|
except core.BitException as e:
|
|
157
157
|
... # handle the exception
|
|
158
158
|
```
|
|
@@ -181,7 +181,7 @@ except core.BitException as e:
|
|
|
181
181
|
from pybit7z import core
|
|
182
182
|
|
|
183
183
|
try:
|
|
184
|
-
arc = core.BitArchiveReader("archive.7z", core.
|
|
184
|
+
arc = core.BitArchiveReader("archive.7z", core.FormatSevenZip)
|
|
185
185
|
|
|
186
186
|
# Printing archive metadata
|
|
187
187
|
print("Archive properties:",
|
|
@@ -43,11 +43,11 @@ pip install pybit7z
|
|
|
43
43
|
from pybit7z import core
|
|
44
44
|
|
|
45
45
|
try:
|
|
46
|
-
extractor = core.
|
|
46
|
+
extractor = core.BitFileExtractor(core.FormatSevenZip)
|
|
47
47
|
extractor.extract("path/to/archive.7z", "out/dir/")
|
|
48
48
|
|
|
49
49
|
# Extracting a specific file inside an archive
|
|
50
|
-
extractor.
|
|
50
|
+
extractor.extract_matching("path/to/archive.7z", "file.pdf", "out/dir/")
|
|
51
51
|
|
|
52
52
|
# Extracting the first file of an archive to a buffer
|
|
53
53
|
buffer: bytes = extractor.extract("path/to/archive.7z")
|
|
@@ -66,7 +66,7 @@ from pybit7z import core
|
|
|
66
66
|
|
|
67
67
|
try:
|
|
68
68
|
# Opening the archive
|
|
69
|
-
archive = core.Bit7zArchiveReader("path/to/archive.gz",
|
|
69
|
+
archive = core.Bit7zArchiveReader("path/to/archive.gz", core.FormatGZip)
|
|
70
70
|
|
|
71
71
|
# Testing the archive
|
|
72
72
|
archive.test()
|
|
@@ -105,12 +105,12 @@ try:
|
|
|
105
105
|
compressor.compress_files(files, "protected_archive.zip")
|
|
106
106
|
|
|
107
107
|
# Updating an existing zip archive
|
|
108
|
-
compressor.set_update_mode(core.UpdateMode
|
|
108
|
+
compressor.set_update_mode(core.UpdateMode.Append)
|
|
109
109
|
compressor.compress_files(files, "existing_archive.zip")
|
|
110
110
|
|
|
111
111
|
# Compressing a single file into a buffer
|
|
112
|
-
compressor2 = core.BitFileCompressor(
|
|
113
|
-
buffer: bytes = compressor2.
|
|
112
|
+
compressor2 = core.BitFileCompressor(core.FormatBZip2)
|
|
113
|
+
buffer: bytes = compressor2.compress_file(files[0])
|
|
114
114
|
except core.BitException as e:
|
|
115
115
|
... # handle the exception
|
|
116
116
|
```
|
|
@@ -139,7 +139,7 @@ except core.BitException as e:
|
|
|
139
139
|
from pybit7z import core
|
|
140
140
|
|
|
141
141
|
try:
|
|
142
|
-
arc = core.BitArchiveReader("archive.7z", core.
|
|
142
|
+
arc = core.BitArchiveReader("archive.7z", core.FormatSevenZip)
|
|
143
143
|
|
|
144
144
|
# Printing archive metadata
|
|
145
145
|
print("Archive properties:",
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
diff --git a/cmake/CompilerOptions.cmake b/cmake/CompilerOptions.cmake
|
|
2
|
+
index 1cdb84f..fd9346f 100644
|
|
3
|
+
--- a/cmake/CompilerOptions.cmake
|
|
4
|
+
+++ b/cmake/CompilerOptions.cmake
|
|
5
|
+
@@ -70,7 +70,7 @@ if( MSVC )
|
|
6
|
+
endforeach()
|
|
7
|
+
endif()
|
|
8
|
+
else()
|
|
9
|
+
- target_compile_options( ${LIB_TARGET} PRIVATE -Wall -Wextra -Werror -Wconversion -Wsign-conversion )
|
|
10
|
+
+ target_compile_options( ${LIB_TARGET} PRIVATE -Wall -Wextra -Wconversion -Wsign-conversion )
|
|
11
|
+
endif()
|
|
12
|
+
|
|
13
|
+
# Extra warning flags for Clang
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
2
|
+
index f8ff6f0..855b78d 100644
|
|
3
|
+
--- a/CMakeLists.txt
|
|
4
|
+
+++ b/CMakeLists.txt
|
|
5
|
+
@@ -194,15 +194,22 @@ include( cmake/BuildOptions.cmake )
|
|
6
|
+
include( cmake/CompilerOptions.cmake )
|
|
7
|
+
|
|
8
|
+
# dependencies
|
|
9
|
+
-include( cmake/Dependencies.cmake )
|
|
10
|
+
+# include( cmake/Dependencies.cmake )
|
|
11
|
+
+find_package(7zip CONFIG REQUIRED)
|
|
12
|
+
+add_library(7-zip ALIAS 7zip::7zip)
|
|
13
|
+
|
|
14
|
+
# 7-zip source code
|
|
15
|
+
target_link_libraries( ${LIB_TARGET} PRIVATE 7-zip )
|
|
16
|
+
|
|
17
|
+
# filesystem library (needed if std::filesystem is not available)
|
|
18
|
+
+if(0)
|
|
19
|
+
if( ghc_filesystem_ADDED )
|
|
20
|
+
target_link_libraries( ${LIB_TARGET} PRIVATE ghc_filesystem )
|
|
21
|
+
endif()
|
|
22
|
+
+else()
|
|
23
|
+
+ find_package(ghc_filesystem CONFIG REQUIRED)
|
|
24
|
+
+ target_link_libraries(${LIB_TARGET} PRIVATE ghcFilesystem::ghc_filesystem )
|
|
25
|
+
+endif()
|
|
26
|
+
|
|
27
|
+
# public includes
|
|
28
|
+
target_include_directories( ${LIB_TARGET} PUBLIC "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>"
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
2
|
+
index 2eb8634..f8ff6f0 100644
|
|
3
|
+
--- a/CMakeLists.txt
|
|
4
|
+
+++ b/CMakeLists.txt
|
|
5
|
+
@@ -179,7 +179,7 @@ message( STATUS "Language Standard for bit7z: C++${CMAKE_CXX_STANDARD}" )
|
|
6
|
+
set( LIB_TARGET bit7z${ARCH_POSTFIX} )
|
|
7
|
+
add_library( ${LIB_TARGET} STATIC )
|
|
8
|
+
target_sources( ${LIB_TARGET}
|
|
9
|
+
- PUBLIC ${PUBLIC_HEADERS}
|
|
10
|
+
+ # PUBLIC ${PUBLIC_HEADERS}
|
|
11
|
+
PRIVATE ${HEADERS} ${SOURCES} )
|
|
12
|
+
|
|
13
|
+
# additional target without the architecture suffix in the name
|
|
14
|
+
@@ -246,3 +246,29 @@ endif()
|
|
15
|
+
if( BIT7Z_BUILD_DOCS )
|
|
16
|
+
add_subdirectory( docs )
|
|
17
|
+
endif()
|
|
18
|
+
+
|
|
19
|
+
+set_target_properties(${LIB_TARGET} PROPERTIES PUBLIC_HEADER "${PUBLIC_HEADERS}")
|
|
20
|
+
+
|
|
21
|
+
+include(CMakePackageConfigHelpers)
|
|
22
|
+
+configure_package_config_file(
|
|
23
|
+
+ "${CMAKE_CURRENT_SOURCE_DIR}/unofficial-bit7z-config.cmake.in"
|
|
24
|
+
+ "${CMAKE_CURRENT_BINARY_DIR}/unofficial-bit7z-config.cmake"
|
|
25
|
+
+ INSTALL_DESTINATION "share/unofficial-bit7z"
|
|
26
|
+
+)
|
|
27
|
+
+install(
|
|
28
|
+
+ FILES "${CMAKE_CURRENT_BINARY_DIR}/unofficial-bit7z-config.cmake"
|
|
29
|
+
+ DESTINATION "share/unofficial-bit7z"
|
|
30
|
+
+)
|
|
31
|
+
+
|
|
32
|
+
+include(GNUInstallDirs)
|
|
33
|
+
+install(
|
|
34
|
+
+ TARGETS ${LIB_TARGET}
|
|
35
|
+
+ EXPORT unofficial-bit7z-targets
|
|
36
|
+
+ COMPONENT bit7z
|
|
37
|
+
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
38
|
+
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
39
|
+
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
40
|
+
+ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/bit7z COMPONENT bit7z_development)
|
|
41
|
+
+
|
|
42
|
+
+install(EXPORT unofficial-bit7z-targets FILE unofficial-bit7z-targets.cmake NAMESPACE unofficial::bit7z:: DESTINATION share/unofficial-bit7z)
|
|
43
|
+
+
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
2
|
+
|
|
3
|
+
vcpkg_from_github(
|
|
4
|
+
OUT_SOURCE_PATH SOURCE_PATH
|
|
5
|
+
REPO rikyoz/bit7z
|
|
6
|
+
REF "v${VERSION}"
|
|
7
|
+
SHA512 c0577b07301b09726fb46164483dc277d681a74a80a90a1aa4881d949be28e6ec26678a0cfbf83e38b4915c8a724078e0771fecefba8c6dfbf9029f8db6063fa
|
|
8
|
+
HEAD_REF master
|
|
9
|
+
PATCHES
|
|
10
|
+
fix_install.patch
|
|
11
|
+
fix_dependency.patch
|
|
12
|
+
fix_compile_options.patch
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
file(COPY "${CMAKE_CURRENT_LIST_DIR}/unofficial-bit7z-config.cmake.in" DESTINATION "${SOURCE_PATH}")
|
|
16
|
+
|
|
17
|
+
vcpkg_check_features(
|
|
18
|
+
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
19
|
+
FEATURES
|
|
20
|
+
regex-matching BIT7Z_REGEX_MATCHING
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
vcpkg_cmake_configure(
|
|
24
|
+
SOURCE_PATH "${SOURCE_PATH}"
|
|
25
|
+
OPTIONS
|
|
26
|
+
-DBIT7Z_AUTO_FORMAT=ON
|
|
27
|
+
-DBIT7Z_AUTO_PREFIX_LONG_PATHS=ON
|
|
28
|
+
-DBIT7Z_DISABLE_ZIP_ASCII_PWD_CHECK=OFF
|
|
29
|
+
-DBIT7Z_PATH_SANITIZATION=ON
|
|
30
|
+
-DBIT7Z_DISABLE_USE_STD_FILESYSTEM=OFF
|
|
31
|
+
-DBIT7Z_USE_STD_BYTE=OFF
|
|
32
|
+
-DBIT7Z_USE_NATIVE_STRING=OFF
|
|
33
|
+
-DBIT7Z_USE_SYSTEM_CODEPAGE=OFF
|
|
34
|
+
-DBIT7Z_BUILD_TESTS=OFF
|
|
35
|
+
-DBIT7Z_BUILD_DOCS=OFF
|
|
36
|
+
${FEATURE_OPTIONS}
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
vcpkg_cmake_install()
|
|
40
|
+
vcpkg_copy_pdbs()
|
|
41
|
+
|
|
42
|
+
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-bit7z CONFIG_PATH share/unofficial-bit7z)
|
|
43
|
+
|
|
44
|
+
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
|
45
|
+
|
|
46
|
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "bit7z",
|
|
3
|
+
"version": "4.0.9",
|
|
4
|
+
"port-version": 1,
|
|
5
|
+
"description": "A C++ static library offering a clean and simple interface to the 7-zip shared libraries.",
|
|
6
|
+
"homepage": "https://github.com/rikyoz/bit7z",
|
|
7
|
+
"license": "MPL-2.0",
|
|
8
|
+
"dependencies": [
|
|
9
|
+
"7zip",
|
|
10
|
+
"ghc-filesystem",
|
|
11
|
+
{
|
|
12
|
+
"name": "vcpkg-cmake",
|
|
13
|
+
"host": true
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "vcpkg-cmake-config",
|
|
17
|
+
"host": true
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"features": {
|
|
21
|
+
"regex-matching": {
|
|
22
|
+
"description": "Enables the support for extracting files matching regular expressions"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -11,7 +11,7 @@ DIR = Path(__file__).parent.resolve()
|
|
|
11
11
|
nox.options.sessions = ["lint", "pylint", "tests"]
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
@nox.session
|
|
14
|
+
@nox.session(reuse_venv=True)
|
|
15
15
|
def lint(session: nox.Session) -> None:
|
|
16
16
|
"""
|
|
17
17
|
Run the linter.
|
|
@@ -78,6 +78,16 @@ def docs(session: nox.Session) -> None:
|
|
|
78
78
|
session.run("sphinx-build", "--keep-going", *shared_args)
|
|
79
79
|
|
|
80
80
|
|
|
81
|
+
@nox.session(reuse_venv=True)
|
|
82
|
+
def pyi(session: nox.Session) -> None:
|
|
83
|
+
"""
|
|
84
|
+
Generate the Pyi type stubs.
|
|
85
|
+
"""
|
|
86
|
+
session.install("pybind11-stubgen")
|
|
87
|
+
session.install(".[test]")
|
|
88
|
+
session.run("pybind11-stubgen", "pybit7z._core", "-o", "src")
|
|
89
|
+
|
|
90
|
+
|
|
81
91
|
@nox.session
|
|
82
92
|
def build(session: nox.Session) -> None:
|
|
83
93
|
"""
|
|
@@ -28,12 +28,14 @@ target_include_interface_directories(
|
|
|
28
28
|
${target_name_internal} ${CMAKE_CURRENT_SOURCE_DIR}/include
|
|
29
29
|
${CMAKE_CURRENT_BINARY_DIR}/git_version)
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
get_property(
|
|
32
|
+
imported_targets
|
|
33
|
+
DIRECTORY
|
|
34
|
+
PROPERTY IMPORTED_TARGETS)
|
|
35
|
+
list(FILTER imported_targets INCLUDE REGEX [[bit7z::]])
|
|
36
|
+
|
|
37
|
+
target_link_libraries(${target_name_internal} PUBLIC 7zip::7zip
|
|
38
|
+
${imported_targets})
|
|
37
39
|
|
|
38
40
|
# The main target only contains main logits. Here it is recommended to put the
|
|
39
41
|
# parts that need to be verified and tested in the target target_name_internal
|
|
@@ -798,6 +798,19 @@ Returns:
|
|
|
798
798
|
.def("archive_path",
|
|
799
799
|
&bit7z::BitInputArchive::archivePath,
|
|
800
800
|
py::doc(R"pydoc(the path to the archive (the empty string for buffer/stream archives).)pydoc"))
|
|
801
|
+
.def(
|
|
802
|
+
"use_format_property",
|
|
803
|
+
[](bit7z::BitInputArchive &self, const std::wstring &name, const bit7z::BitPropVariant &property) {
|
|
804
|
+
self.useFormatProperty(name.c_str(), property);
|
|
805
|
+
},
|
|
806
|
+
py::arg("name"),
|
|
807
|
+
py::arg("property"),
|
|
808
|
+
py::doc(
|
|
809
|
+
R"pydoc(Use the given format property to read the archive. See <https://github.com/rikyoz/bit7z/issues/248> for more information.
|
|
810
|
+
|
|
811
|
+
Args:
|
|
812
|
+
name: the name of the property.
|
|
813
|
+
property: the property value.)pydoc"))
|
|
801
814
|
.def("extract_to",
|
|
802
815
|
static_cast<void (bit7z::BitInputArchive::*)(const std::string &) const>(
|
|
803
816
|
&bit7z::BitInputArchive::extractTo),
|
|
@@ -1163,6 +1163,14 @@ class BitInputArchive:
|
|
|
1163
1163
|
|
|
1164
1164
|
If the archive is not valid, or there's no item at the given index, a BitException is thrown!
|
|
1165
1165
|
"""
|
|
1166
|
+
def use_format_property(self, name: str, property: BitPropVariant) -> None:
|
|
1167
|
+
"""
|
|
1168
|
+
Use the given format property to read the archive. See <https://github.com/rikyoz/bit7z/issues/248> for more information.
|
|
1169
|
+
|
|
1170
|
+
Args:
|
|
1171
|
+
name: the name of the property.
|
|
1172
|
+
property: the property value.
|
|
1173
|
+
"""
|
|
1166
1174
|
|
|
1167
1175
|
class BitMemCompressor(BitAbstractArchiveCreator):
|
|
1168
1176
|
def __init__(self, format: BitInOutFormat) -> None:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pybit7z-0.1.2 → pybit7z-0.2.2}/cmake/vcpkg/bootstrap/vcpkg_skip_install_on_reconfigure.cmake
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|