@@ -4,16 +4,16 @@ ExtractCode
44- license: Apache-2.0
55- copyright: copyright (c) nexB. Inc. and others
66- homepage_url: https://github.com/nexB/extractcode
7- - keywords: archive, extraction, libarchive, 7zip, scancode-toolkit
7+ - keywords: archive, extraction, libarchive, 7zip, scancode-toolkit, extractcode
88
99
1010ExtractCode is a universal archive extractor. It uses behind the scenes
1111multiple tools such as:
1212
13- - the Python standard library,
13+ - the Python standard library,
1414- 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.
1717
1818With these it is possible to extract a large number of common and
1919
@@ -28,17 +28,84 @@ binding to libmagic) to select the most appropriate extractor or
2828decompressor function. It can handle multi-level archives such as tar.gz and
2929can extract recursively nested archives.
3030
31-
3231Visit https://aboutcode.org and https://github.com/nexB/ for support and download.
3332
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+
3499To set up the development environment::
35100
36101 source configure
37102
103+
38104To run unit tests::
39105
40106 pytest -vvs -n 2
41107
108+
42109To clean up development environment::
43110
44111 ./configure --clean
0 commit comments