@@ -4,16 +4,16 @@ ExtractCode
4
4
- license: Apache-2.0
5
5
- copyright: copyright (c) nexB. Inc. and others
6
6
- homepage_url: https://github.com/nexB/extractcode
7
- - keywords: archive, extraction, libarchive, 7zip, scancode-toolkit
7
+ - keywords: archive, extraction, libarchive, 7zip, scancode-toolkit, extractcode
8
8
9
9
10
10
ExtractCode is a universal archive extractor. It uses behind the scenes
11
11
multiple tools such as:
12
12
13
- - the Python standard library,
13
+ - the Python standard library,
14
14
- a custom ctypes binding to libarchive,
15
- - the 7zip command line
16
- - optionally libguestfs on Linux
15
+ - the 7zip command line, and
16
+ - optionally libguestfs on Linux.
17
17
18
18
With these it is possible to extract a large number of common and
19
19
@@ -28,17 +28,84 @@ binding to libmagic) to select the most appropriate extractor or
28
28
decompressor function. It can handle multi-level archives such as tar.gz and
29
29
can extract recursively nested archives.
30
30
31
-
32
31
Visit https://aboutcode.org and https://github.com/nexB/ for support and download.
33
32
33
+ We run CI tests on:
34
+
35
+ - Azure pipelines https://dev.azure.com/nexB/extractcode/_build
36
+
37
+ We run CI tests on:
38
+
39
+ - Azure pipelines https://dev.azure.com/nexB/extractcode/_build
40
+
41
+ To install this package with its full capability (where the binaries for
42
+ 7zip and libarchive are installed), use the `full ` option::
43
+
44
+ pip install extractcode[full]
45
+
46
+ If you want to use the version of binaries (possibly) provided by your operating
47
+ system, use the `minimal ` option::
48
+
49
+ pip install extractcode
50
+
51
+ In this case, you will need to provide a working libarchive and 7zip
52
+ available in one of these ways:
53
+
54
+ - **a typecode-libarchive and typecode-7z plugin **: See the standard ones at
55
+ https://github.com/nexB/scancode-plugins/tree/main/builtins
56
+ These can either bundle a libarchive library, a 7z executable or expose a
57
+ system-installed libraries.
58
+ It does so by providing plugin entry points as ``scancode_location_provider ``
59
+ for ``extractcode_libarchive `` that should point to a ``LocationProviderPlugin ``
60
+ subclass with a ``get_locations() `` method that must return a mapping with this key:
61
+
62
+ - 'extractcode.libarchive.dll': the absolute path to a libarchive DLL
63
+
64
+ See for example:
65
+
66
+ - https://github.com/nexB/scancode-plugins/blob/4da5fe8a5ab1c87b9b4af9e54d7ad60e289747f5/builtins/extractcode_libarchive-linux/setup.py#L40
67
+ - https://github.com/nexB/scancode-plugins/blob/4da5fe8a5ab1c87b9b4af9e54d7ad60e289747f5/builtins/extractcode_libarchive-linux/src/extractcode_libarchive/__init__.py#L17
68
+
69
+ And the ``scancode_location_provider `` for ``extractcode_7zip `` should point
70
+ to a ``LocationProviderPlugin `` subclass with a ``get_locations() `` method that must
71
+ return a mapping with this key:
72
+
73
+ - 'extractcode.sevenzip.exe': the absolute path to a 7zip executable
74
+
75
+ See for example:
76
+
77
+ - https://github.com/nexB/scancode-plugins/blob/4da5fe8a5ab1c87b9b4af9e54d7ad60e289747f5/builtins/extractcode_7z-linux/setup.py#L40
78
+ - https://github.com/nexB/scancode-plugins/blob/4da5fe8a5ab1c87b9b4af9e54d7ad60e289747f5/builtins/extractcode_7z-linux/src/extractcode_7z/__init__.py#L18
79
+
80
+ - **environment variables **:
81
+
82
+ - EXTRACTCODE_LIBARCHIVE_PATH: the absolute path to a libarchive DLL
83
+ - EXTRACTCODE_7Z_PATH: the absolute path to a 7zip executable
84
+
85
+
86
+ - **a system-installed libarchive and 7zip executable in the system PATH **:
87
+
88
+
89
+ The supported versions are:
90
+
91
+ - libarchive 3.5.x
92
+ - 7zip 16.5.x
93
+
94
+
95
+ Development
96
+ -----------
97
+
98
+
34
99
To set up the development environment::
35
100
36
101
source configure
37
102
103
+
38
104
To run unit tests::
39
105
40
106
pytest -vvs -n 2
41
107
108
+
42
109
To clean up development environment::
43
110
44
111
./configure --clean
0 commit comments