Skip to content

Commit

Permalink
Added dev script for docs & installation steps for centos
Browse files Browse the repository at this point in the history
Signed-off-by: Omkar Phansopkar <[email protected]>
  • Loading branch information
OmkarPh committed Sep 4, 2023
1 parent 989e44d commit 644af13
Show file tree
Hide file tree
Showing 7 changed files with 98 additions and 29 deletions.
44 changes: 44 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Virtual environment
.venv/

# sphinx build folder
build/

# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so

# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip

# Logs and databases #
######################
*.log
*.sql
*.sqlite

# OS generated files #
######################
.DS_Store?
ehthumbs.db
Icon?
Thumbs.db

# Editor backup files #
#######################
*~
9 changes: 9 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SPHINXDEVBUILD = sphinx-autobuild
SOURCEDIR = source
BUILDDIR = build

Expand All @@ -14,6 +15,14 @@ help:

.PHONY: help Makefile

# Run the development server using sphinx-autobuild
dev:
@$(SPHINXBUILD) -b html $(SPHINXOPTS) "$(SOURCEDIR)" "$(BUILDDIR)/html"
@echo
@echo "Starting up the auto-reloading development server..."
@echo
$(SPHINXDEVBUILD) --port 8000 --watch ${SOURCEDIR} $(SOURCEDIR) "$(BUILDDIR)/html" $(SPHINXOPTS) $(O)

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
Expand Down
10 changes: 7 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@ The first step you want to do is create the python virtual environment:
```
$ cd docs/
$ python3 -m venv .venv
$ source .venv/bin/active
$ source .venv/bin/activate
$ pip install -r requirements.txt
```

Now, you can run the various Spinx build things:
Run Sphinx documentation server in dev mode:
```
$ make dev
```

Build Sphinx documentation
```
$ make html
$ etc
```
47 changes: 24 additions & 23 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
alabaster==0.7.12
Babel==2.9.1
certifi==2019.11.28
chardet==3.0.4
colorama==0.4.3
docutils==0.16
idna==2.9
imagesize==1.2.0
alabaster
Babel
certifi
chardet
colorama
docutils
idna
imagesize
Jinja2==2.11.3
MarkupSafe==1.1.1
packaging==20.3
Pygments==2.7.4
pyparsing==2.4.6
pytz==2019.3
requests==2.23.0
six==1.14.0
snowballstemmer==2.0.0
packaging
Pygments
pyparsing
pytz
requests
six
snowballstemmer
Sphinx==2.4.4
sphinx-rtd-theme==0.4.3
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==1.0.3
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.4
urllib3==1.26.5
sphinx-autobuild
sphinx_rtd_theme
sphinxcontrib-applehelp
sphinxcontrib-devhelp
sphinxcontrib-htmlhelp
sphinxcontrib-jsmath
sphinxcontrib-qthelp
sphinxcontrib-serializinghtml
urllib3
7 changes: 4 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.intersphinx'
'sphinx.ext.intersphinx',
'sphinx_rtd_theme'
]

master_doc = 'index'
Expand Down Expand Up @@ -65,13 +66,13 @@
html_context = {
'css_files': [
'_static/theme_overrides.css', # override wide tables in RTD theme
],
],
"display_github": True,
"github_user": "nexB",
"github_repo": "scancode-workbench",
"github_version": "develop", # branch
"conf_py_path": "/docs/source/", # path in the checkout to the docs root
}
}

# If false, no index is generated.
#
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions docs/source/getting-started/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ Download and Install
``ScanCode-Workbench-<os>-x64-<version>`` folder.
On Windows 10, for example, the executable will be named `ScanCode-Workbench.exe`.

- Note - For CentOS (or linux distros without the new libstdc++):

- Install the new libstdc++ library: ``yum provides libstdc++``.
- Update LD_LIBRARY_PATH:

``export LD_LIBRARY_PATH="/usr/local/lib64/:$LD_LIBRARY_PATH"``
- Run the application with ``no-sandbox`` option:

``./ScanCode\ Workbench-linux-x64/ScanCode\ Workbench --no-sandbox``

- If you're interested in digging into the code, you can also use ScanCode Workbench by cloning
the GitHub repository and building it yourself -- see the :ref:`Contribute/Building<building>`
section for details.
Expand Down

0 comments on commit 644af13

Please sign in to comment.