@@ -2,13 +2,18 @@ Comprehensive Installation
22==========================
33
44
5- There are four main ways to install ScanCode.
5+ There in one way to install ScanCode.
66
77- :ref: `app_install `
88
99 The recommended method is to download the latest application release as an
1010 application and then configure and use directly. No knowledge of pip/git or
11- other developer tools is necessary.
11+ other developer tools is necessary. You only need to install Python then
12+ download and extract the ScanCode application archive to run ScanCode.
13+ For standard usage that's all you need.
14+
15+
16+ For advanced usage and experienced users, you can also use any of these mode:
1217
1318- :ref: `docker_install `
1419
@@ -18,13 +23,14 @@ There are four main ways to install ScanCode.
1823
1924- :ref: `source_code_install `
2025
21- You can clone the git source code repository and then run a configure script
22- to configure and install ScanCode.
26+ You can clone the git source code repository and then run the configure script
27+ to configure and install ScanCode for local and development usage .
2328
2429- :ref: `pip_install `
2530
2631 To use ScanCode as a library in your application, you can install it via
27- ``pip ``. This is recommended for developers/users familiar with Python.
32+ ``pip ``. This is recommended for developers or users familiar with Python
33+ that want to embed ScanCode as a library.
2834
2935----
3036
@@ -38,14 +44,15 @@ Before Installing
3844System Requirements
3945^^^^^^^^^^^^^^^^^^^
4046
41- - Hardware : ScanCode will run best with a modern X86 processor and at least 4GB
42- of RAM and 500MB of disk. These are bare minimum requirements.
47+ - Hardware : ScanCode will run best with a modern X86 64 bits processor and at
48+ least 8GB of RAM and 2GB of disk space . These are minimum requirements.
4349
4450- Supported operating systems: ScanCode should run on these 64-bit OSes running
4551 X86_64 processors:
4652
4753 #. Linux: on recent 64-bit Linux distributions,
48- #. Mac: on recent 64-bit macOS (10.14 and up),
54+ #. Mac: on recent x86 64-bit macOS (10.15 and up, including 11 and 12),
55+ Use the X86 emulation mode on Apple ARM M1 CPUs.
4956 #. Windows: on Windows 10 and up,
5057 #. FreeBSD,
5158
@@ -56,15 +63,15 @@ Prerequisites
5663^^^^^^^^^^^^^
5764
5865ScanCode needs a Python 3.7+ interpreter; We support all Python versions from
59- 3.7 to 3.10.
66+ 3.7 to 3.10. The default version for the application archives is Python 3.8
6067
6168- **On Linux **:
6269
6370 Use your package manager to install ``python3 ``.
6471
6572 For Ubuntu, it is ``sudo apt install python3-dev ``
6673
67- - On Ubuntu 14, 16, 18 and 20 run::
74+ - On Ubuntu 16, 18, 20 and 22 run::
6875
6976 sudo apt install python-dev bzip2 xz-utils zlib1g libxml2-dev libxslt1-dev libpopt0
7077
@@ -84,13 +91,17 @@ ScanCode needs a Python 3.7+ interpreter; We support all Python versions from
8491 If these packages are not available from your package manager, you must
8592 compile them from sources.
8693
94+
8795- **On Mac **:
8896
89- Download and install Python 3.7 or higher from https://www.python.org/
97+ The default Python 3 provided with macOS is 3.8.
98+ Alternativelu you can download and install Python 3.8 from https://www.python.org/
99+
100+
90101
91102- **On Windows **:
92103
93- Download and install Python 3.7 or higher from https://www.python.org/
104+ Download and install Python 3.8 from https://www.python.org/
94105
95106 .. Note ::
96107
@@ -99,30 +110,32 @@ ScanCode needs a Python 3.7+ interpreter; We support all Python versions from
99110
100111 See the :ref: `windows_app_install ` section for more installation details.
101112
102- .. Note ::
103-
104- ScanCode app archives come with packaged with all required dependencies except
105- for Python that has to be downloaded and installed separately.
106-
107113----
108114
109115.. _app_install :
110116
111117Installation as an Application: Downloading Releases
112118-----------------------------------------------------
113119
120+ .. Note ::
121+
122+ ScanCode app archives come with packaged with all required dependencies except
123+ for Python that has to be downloaded and installed separately.
124+
125+
126+
114127Installation on Linux and Mac
115128^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
116129
117130Get the Scancode Toolkit tarball archive of a specific version and your
118131operating system by going to the `project releases page <https://github.com/nexB/scancode-toolkit/releases/ >`_
119132
120- For example, Version 21.8 .1 archive can be obtained from
121- `Toolkit release 21.8 .1 <https://github.com/nexB/scancode-toolkit/releases/tag/v21.8 .1 >`_
133+ For example, Version 30.0 .1 archive can be obtained from
134+ `Toolkit release 30.0 .1 <https://github.com/nexB/scancode-toolkit/releases/tag/v30.0 .1 >`_
122135under assets options. Download the archive for your operating systen and extract
123136the archive from command line::
124137
125- tar -xvf scancode-toolkit-21.8.1_py39 -linux.tar.xz
138+ tar -xvf scancode-toolkit-30.0.1_py38 -linux.tar.gz
126139
127140
128141Or, on Linux, right click and select "Extract Here".
@@ -177,7 +190,7 @@ Installation on Windows 10
177190 then Right-click in this window and select Paste. This will paste the path you
178191 copied before and is where you extracted ScanCode::
179192
180- cd path/to/extracted_ScanCode
193+ cd path/to/extracted/ScanCode
181194
182195- Press Enter.
183196
@@ -189,8 +202,7 @@ Installation on Windows 10
189202 scancode -h
190203
191204- Press enter. This first command will configure your ScanCode installation.
192-
193- - Several messages are displayed followed by the ScanCode command help.
205+ Several messages are displayed followed by the ScanCode command help.
194206
195207- The installation is complete.
196208
@@ -200,7 +212,8 @@ Un-installation
200212
201213- Delete the directory in which you extracted ScanCode.
202214- Delete any temporary files created in your system temp and user temp directory
203- under a scanCode-prefixed directory.
215+ under a ScanCode-prefixed directory such as .scancode-tk or .cache/scancode-tk.
216+
204217
205218----
206219
@@ -242,9 +255,9 @@ Display help::
242255
243256 docker run scancode-toolkit --help
244257
245- Mount current working directory and run scan on mounted folder::
258+ Mount current working directory and run scan on this mounted folder::
246259
247- docker run -v $PWD/:/project scancode-toolkit -clpeui --json-pp /project/result.json /project
260+ docker run -v $PWD/:/project scancode-toolkit -clipeu --json-pp /project/result.json /project
248261
249262This will mount your current working from the host into ``/project `` in the container
250263and then scan the contents. The output ``result.json `` will be written back to your
@@ -253,6 +266,7 @@ current working directory on the host.
253266Note that the parameters *before * ``scancode-toolkit `` are used for docker,
254267those after will be forwarded to scancode.
255268
269+
256270----
257271
258272
@@ -261,45 +275,27 @@ those after will be forwarded to scancode.
261275Installation from Source Code: Git Clone
262276-----------------------------------------
263277
264- You can also download the Scancode Toolkit Source Code and build from it yourself. This is how you
265- would want to do it if:
266-
267- - You are adding new patches to Scancode and want to test it. So you build ScanCode locally
268- with your added changes.
278+ You can download the Scancode Toolkit Source Code and build from it yourself.
279+ This is what you would want to do it if:
269280
270- - You want to test a specific version/checkpoint/branch from the VCS.
281+ - You are developing ScanCode or adding new patches or want to run tests.
282+ - You want to test or run a specific version/checkpoint/branch from the version control.
271283
272284
273285Download the ScanCode-Toolkit Source Code
274286^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
275287
276- If you don't have the ScanCode Toolkit Source Code downloaded, get it from its
277- `official Repository <https://github.com/nexB/scancode-toolkit/ >`_ (Downloaded as a .zip file)
278-
279- Or you can run the following if you have `Git <https://git-scm.com/ >`_ installed::
288+ Run the following once you have `Git <https://git-scm.com/ >`_ installed::
280289
281290 git clone https://github.com/nexB/scancode-toolkit.git
282291 cd scancode-toolkit
283292
284- Now, by default the files are checked out to the develop branch, but you can jump to any checkpoint
285- using the following command::
286-
287- git checkout develop
288-
289- Here, ``develop `` branch has the latest release of Scancode-Toolkit.
290- You can also check out to any of the following:
291-
292- - Branches (Locally created or already present) [Example - ``develop ``]
293- - Tags (essentially version numbers) [Example - ``v21.8.1 ``, ``v21.5.31 ``]
294- - Commits (use the shortened commit hash) [Example - ``4502055 ``, ``f276398 ``]
295-
296293
297294Configure the build
298295^^^^^^^^^^^^^^^^^^^
299296
300- ScanCode use the Configure scripts to install a virtualenv, install required packaged dependencies
301- as pip requirements and more configure tasks such that ScanCode can be installed in a
302- self-contained way with no network connectivity required.
297+ ScanCode use a configure scripts to create an isolated virtual environment,
298+ install required packaged dependencies.
303299
304300On Linux/Mac:
305301
@@ -308,13 +304,15 @@ On Linux/Mac:
308304- run ``./configure ``
309305- run ``source venv/bin/activate ``
310306
307+
311308On Windows:
312309
313310- open a command prompt
314311- cd to the clone directory
315312- run ``configure ``
316313- run ``venv\Scripts\activate ``
317314
315+
318316Now you are ready to use the freshly configured scancode-toolkit.
319317
320318.. NOTE ::
@@ -331,7 +329,9 @@ Now you are ready to use the freshly configured scancode-toolkit.
331329Installation as a library: via ``pip ``
332330--------------------------------------
333331
334- ScanCode can be installed using ``pip ``, the default Python Package Manager.
332+ ScanCode can be installed from the public PyPI repository using ``pip `` which
333+ the standard Python package management tool.
334+
335335The steps are:
336336
337337#. Create a Python virtual environment::
@@ -345,10 +345,13 @@ For more information on Python virtualenv, visit this
345345
346346 source venv/bin/activate
347347
348- #. Run ``pip install --upgrade pip setuptools wheel `` to install the latest
349- versions of base utilities.
348+ #. Run pip to install the latest versions of base utilities::
349+
350+ pip install --upgrade pip setuptools wheel
351+
352+ #. Install the latest version of ScanCode::
350353
351- #. Run `` pip install scancode-toolkit `` to install the latest version of ScanCode.
354+ pip install scancode-toolkit
352355
353356.. NOTE ::
354357
@@ -357,27 +360,32 @@ For more information on Python virtualenv, visit this
357360 special use cases such as packaging for a Linux or FreeBSD distro.
358361
359362
360- To uninstall, run ``pip uninstall scancode-toolkit ``.
363+ To uninstall, run::
364+
365+ pip uninstall scancode-toolkit
361366
362367
363368----
364369
365370.. _commands_variation :
366371
367- Commands Variation
368- ------------------
372+ Command Invocation Variations
373+ -----------------------------
374+
375+ These are the commands to invoke ScanCode based on:
369376
370- The commands to run ScanCode varies for:
377+ - your installation methods
378+ - your operating systems
371379
372- - Different Installation Methods
373- - OS used
380+ The two form of commands are:
374381
375- The two types of commands are :
382+ - Use the scancode command directly, typically on Windows or in an activated virtualenv: :
376383
377- - ``scancode [OPTIONS] <OUTPUT FORMAT OPTION(s)> <SCAN INPUT> ``
378- - ``path/to/scancode OPTIONS] <OUTPUT FORMAT OPTION(s)> <SCAN INPUT> ``
384+ scancode [OPTIONS] <OUTPUT FORMAT OPTION(s)> <SCAN INPUT>
379385
380- In the second case, ``./scancode `` is used if already in the directory.
386+ - Use a path to the scancode command, typically with an application installation ::
387+
388+ path/to/scancode [OPTIONS] <OUTPUT FORMAT OPTION(s)> <SCAN INPUT>
381389
382390These variations are summed up in the following table:
383391
@@ -391,23 +399,16 @@ These variations are summed up in the following table:
391399 - Install from Source Code
392400
393401 * - Linux
394- - `./scancode `
395- - ` scancode `
396- - `./scancode `
402+ - path: `./scancode `
403+ - direct: scancode
404+ - path: `./scancode ` or direct: ` scancode `
397405
398406 * - Mac
399- - `./scancode `
400- - ` scancode `
401- - `./scancode `
407+ - path: `./scancode `
408+ - direct: scancode
409+ - path: `./scancode ` or direct: ` scancode `
402410
403411 * - Windows
404- - `scancode `
405- - `scancode `
406- - `scancode `
407-
408- To sum it up, ``scancode `` is used in these two cases:
409-
410- - If ``pip `` install is used.
411- - If the OS is Windows.
412-
413- In all other cases, ``./scancode `` is used.
412+ - path: `scancode `
413+ - direct: scancode
414+ - path: `scancode ` or direct: `scancode `
0 commit comments