|
2 | 2 | Installation
|
3 | 3 | ============
|
4 | 4 |
|
5 |
| -There are 4 main ways you can `install ScanCode <https://scancode-toolkit.readthedocs.io/en/latest/getting-started/install.html>`_. |
| 5 | +There are a few ways you can `install ScanCode <https://scancode-toolkit.readthedocs.io/en/latest/getting-started/install.html>`_. |
| 6 | + |
| 7 | +- Recommended standard install for everyone: Use a release download and install as an application |
| 8 | + |
| 9 | +- Advanced installation options: |
| 10 | + - pip install a Python PyPI package |
| 11 | + - from source code using a git clone |
| 12 | + - using Docker |
6 | 13 |
|
7 |
| -- Installation as an Application: Downloading Releases (Recommended) |
8 |
| -- Docker Installation |
9 |
| -- Installation as a library: via pip |
10 |
| -- Installation from Source Code: Git Clone |
11 | 14 |
|
12 | 15 | Prerequisites
|
13 | 16 | -------------
|
14 | 17 |
|
15 |
| -Before installing ScanCode make sure you've installed the prerequisites properly. This mainly |
16 |
| -refers to installing the required Python interpreter (Python 3.6 is recommended). |
| 18 | +Before installing ScanCode make sure you have installed these prerequisites. |
| 19 | +The main one is a Python interpreter. |
| 20 | +Python 3.6 is required for the standard installation. |
17 | 21 |
|
18 | 22 | - For Linux(Ubuntu): ``sudo apt install python3.6-dev bzip2 xz-utils zlib1g libxml2-dev libxslt1-dev``
|
19 |
| -- For MacOS: Install Python 3.6.8 from https://www.python.org/ftp/python/3.6.8/python-3.6.8-macosx10.6.pkg |
20 |
| -- For Windows: Install Python 3.6.8 from https://www.python.org/ftp/python/3.6.8/python-3.6.8.exe |
| 23 | +- For MacOS: Install Python 3.6.8 from https://www.python.org/ftp/python/3.6.8/python-3.6.8-macosx10.9.pkg |
| 24 | +- For Windows: Install Python 3.6.8 from https://www.python.org/ftp/python/3.6.8/python-3.6.8-amd64.exe |
| 25 | +- For FreeBSD: (this ineeds to be documented) |
21 | 26 |
|
22 |
| -Refer `Prerequisites <https://scancode-toolkit.readthedocs.io/en/latest/getting-started/install.html#prerequisites>`_ for detailed information on all different platforms and Python Versions. |
| 27 | +Refer `Prerequisites <https://scancode-toolkit.readthedocs.io/en/latest/getting-started/install.html#prerequisites>`_ |
| 28 | +for detailed information on all different operating systems and Python versions. |
23 | 29 |
|
24 |
| -Installation as an Application : Downloading Releases |
25 |
| ------------------------------------------------------ |
26 | 30 |
|
27 |
| -#. Download and extract the latest ScanCode release from https://github.com/nexB/scancode-toolkit/releases/ |
| 31 | +Use a release download and install as an application |
| 32 | +---------------------------------------------------- |
28 | 33 |
|
29 |
| -#. Open a terminal window and then `cd` to the extracted ScanCode directory. |
| 34 | +- Download and extract the latest ScanCode release from |
| 35 | + https://github.com/nexB/scancode-toolkit/releases/ |
30 | 36 |
|
31 |
| -#. Run this command to self-configure and display the help-text. |
| 37 | +- Open a terminal window (or command prompt on Windows) and then `cd` to the |
| 38 | + extracted ScanCode directory. |
| 39 | + |
| 40 | +- Run this command to self-configure and display the initial command line help: |
32 | 41 |
|
33 | 42 | - Linux/Mac : ``./scancode --help``
|
34 | 43 | - Windows : ``scancode --help``
|
35 | 44 |
|
36 |
| -Docker Installation |
37 |
| -------------------- |
38 | 45 |
|
39 |
| -#. Download the Source Code as an archive from the `GitHub releases <https://github.com/nexB/scancode-toolkit/releases>`_ and unzip it, or via `git clone`. |
| 46 | +Advanced installation: pip install a Python PyPI package |
| 47 | +-------------------------------------------------------- |
40 | 48 |
|
41 |
| -#. Build the docker image from the `scancode-toolkit` directory.:: |
| 49 | +- Create a virtual environment for Python 3.6 (of higher) and activate it:: |
42 | 50 |
|
43 |
| - docker build -t scancode-toolkit . |
| 51 | + virtualenv -p /usr/bin/python3.6 venv-scancode && source venv-scancode/bin/activate |
44 | 52 |
|
45 |
| -#. Mount current working directory and run scan on mounted folder:: |
| 53 | +- Run ``pip install scancode-toolkit[full]`` |
46 | 54 |
|
47 |
| - docker run -v $PWD/:/project scancode-toolkit -clpeui --json-pp /project/result.json /project |
| 55 | +Note that the ``[full]`` extra option is required to get a working installation |
| 56 | +except in some advanced use cases. |
48 | 57 |
|
49 |
| -Note that the parameters *before* ``scancode-toolkit`` are used for docker, |
50 |
| -those after will be forwarded to scancode. |
51 | 58 |
|
52 |
| -Installation as a library: via pip |
53 |
| ----------------------------------- |
54 | 59 |
|
55 |
| -#. Create a Python 3.6 Virtual Environment and activate the same:: |
| 60 | +Advanced installation: using Docker |
| 61 | +----------------------------------- |
56 | 62 |
|
57 |
| - virtualenv -p /usr/bin/python3.6 venv-scancode && source venv-scancode/bin/activate |
| 63 | +- Download the Source Code as an archive from the `GitHub releases |
| 64 | + <https://github.com/nexB/scancode-toolkit/releases>`_ and unzip it, or via |
| 65 | + `git clone`. |
58 | 66 |
|
59 |
| -#. Run ``pip install scancode-toolkit[full]`` |
| 67 | +- Build the docker image from the `scancode-toolkit` directory:: |
60 | 68 |
|
61 |
| -Installation from Source Code: Git Clone |
62 |
| ----------------------------------------- |
| 69 | + docker build -t scancode-toolkit . |
63 | 70 |
|
64 |
| -#. Download the Source Code or Use Git Clone:: |
| 71 | +- Mount current working directory and run a scan the mounted folder:: |
65 | 72 |
|
66 |
| - git clone https://github.com/nexB/scancode-toolkit.git |
67 |
| - cd scancode-toolkit |
| 73 | + docker run -v $PWD/:/project scancode-toolkit -clpeui --json-pp /project/result.json /project |
| 74 | + |
| 75 | +Note that the parameters *before* ``scancode-toolkit`` are used by docker and |
| 76 | +those after will be forwarded to scancode. |
68 | 77 |
|
69 |
| -#. You can jump to any checkpoint/Branch/Commit using the following command:: |
70 | 78 |
|
71 |
| - git checkout master |
| 79 | +Advanced installation: from source code using a git clone |
| 80 | +--------------------------------------------------------- |
72 | 81 |
|
73 |
| -#. Run the Configure Script |
| 82 | +- Download the Source Code or Use Git Clone:: |
| 83 | + |
| 84 | + git clone https://github.com/nexB/scancode-toolkit.git |
| 85 | + cd scancode-toolkit |
74 | 86 |
|
75 |
| - - On Linux/Mac: ``./configure`` |
76 |
| - - On Windows: ``configure`` |
| 87 | +- Run the configure script for development usage: |
77 | 88 |
|
| 89 | + - On Linux/Mac: ``./configure --dev`` |
| 90 | + - On Windows: ``configure --dev`` |
78 | 91 |
|
79 |
| -Note the `Commands will vary <https://scancode-toolkit.readthedocs.io/en/latest/getting-started/install.html#commands-variation>`_ across different Installation methods and Platforms. |
80 | 92 |
|
81 |
| -If this displays the `Help Text <https://scancode-toolkit.readthedocs.io/en/latest/cli-reference/help-text-options.html#help-text>`_, you are all set to start using ScanCode. |
| 93 | +If this displays the `help text |
| 94 | +<https://scancode-toolkit.readthedocs.io/en/latest/cli-reference/help-text-options.html#help-text>`_, |
| 95 | +you are all set to start using ScanCode. |
0 commit comments