-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Update guide for SCANOSS install on Ubuntu 24 #595
docs: Update guide for SCANOSS install on Ubuntu 24 #595
Conversation
Additional steps need for install SCANOSS on Ubuntu 2023.04, Fedora 38, Debian 11, etc. Signed-off-by: o-konoval <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #595 +/- ##
=========================================
Coverage 93.67% 93.67%
Complexity 608 608
=========================================
Files 49 49
Lines 2104 2104
Branches 244 244
=========================================
Hits 1971 1971
Misses 61 61
Partials 72 72 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please consider suggestion in review. Otherwise approved.
Taking in attention review comments from @tdrozdovsky @m-rudyk Signed-off-by: o-konoval <[email protected]>
Change hyphen by comma Signed-off-by: o-konoval <[email protected]>
doc/quick-start-guide-and-build.md
Outdated
- SCANOSS Python package by following the [guidelines](https://github.com/scanoss/scanoss.py#installation). Install it using the command: | ||
- SCANOSS Python package by following the [guidelines](https://github.com/scanoss/scanoss.py#installation). | ||
|
||
For installing SCANOSS on Ubuntu 2023.04, Fedora 38, Debian 11, etc. or later versions of mentioned OSes please follow the note at the end of the paragraph otherwise install it using the command: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not use such abbreviations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please clarify -is it related to names of OSes? I do not know how to inform an user if needed special steps if no information of OS name and version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mention the abbreviation OS
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for comment. Is there a variant? And how to inform user that needed to use pipx instead pip if no OS reference? May be Python version? But on scanoss guide they referenced to name of OSes and versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My suggestion is the following.
Could you try to install ScanOSS using such a command? In case of failure, please refer to the official documentation of ScanOSS.
doc/quick-start-guide-and-build.md
Outdated
@@ -145,6 +147,29 @@ Before building _LPVS_ from source code, ensure that you have the following prer | |||
sudo apt install mysql-server | |||
``` | |||
|
|||
|
|||
> [!NOTE] | |||
> For installing SCANOSS on Ubuntu 2023.04, Fedora 38, Debian 11, etc. or later versions of mentioned OSes, a few additional steps are required, as previously mentioned command : `pip3 install scanoss` will not work correctly. [More details](https://github.com/scanoss/scanoss.py/blob/main/PACKAGE.md#externally-managed-environments-on-linux) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I remember, we use other commands to install scanoss:
pip3 install --require-hashes -r requirements.txt
Why don't you use this command in the guideline?
Ubuntu 2023.4->Ubuntu 23.04, adding comma Signed-off-by: o-konoval <[email protected]>
Signed-off-by: o-konoval <[email protected]>
Fixed |
Signed-off-by: o-konoval <[email protected]>
``` | ||
- Install `scanoss` by using `pipx`: | ||
```bash | ||
pipx install scanoss |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't you use --require-hashes -r requirements.txt
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately pipx does not support such syntax. Need additionally check how to use pipx with specified requirements defined in file.
qa@qa-VirtualBox:~/Downloads/LPVS$ pipx install -help
usage: pipx install [-h] [--quiet] [--verbose] [--include-deps] [--force]
[--suffix SUFFIX] [--python PYTHON]
[--preinstall PREINSTALL] [--system-site-packages]
[--index-url INDEX_URL] [--editable] [--pip-args PIP_ARGS]
[package_spec ...]
The install command is the preferred way to globally install apps
from python packages on your system. It creates an isolated virtual
environment for the package, then ensures the package's apps are
accessible on your $PATH. The package's manual pages installed in
share/man/man[1-9] can be viewed with man on an operating system where
it is available and the path in the environment variable PIPX_MAN_DIR
(default: /home/qa/.local/share/man) is in the man search path
($MANPATH).
The result: apps you can run from anywhere, located in packages
you can cleanly upgrade or uninstall. Guaranteed to not have
dependency version conflicts or interfere with your OS's python
packages. 'sudo' is not required to do this.
pipx install PACKAGE_NAME ...
pipx install --python PYTHON PACKAGE_NAME
pipx install VCS_URL
pipx install ./LOCAL_PATH
pipx install ZIP_FILE
pipx install TAR_GZ_FILE
The PACKAGE_SPEC argument is passed directly to pip install
.
The default virtual environment location is /home/qa/.local/share/pipx
and can be overridden by setting the environment variable PIPX_HOME
(Virtual Environments will be installed to $PIPX_HOME/venvs
).
The default app location is /home/qa/.local/bin and can be
overridden by setting the environment variable PIPX_BIN_DIR
.
The default manual pages location is /home/qa/.local/share/man and
can be overridden by setting the environment variable PIPX_MAN_DIR
.
The default python executable used to install a package is
/usr/bin/python3 and can be overridden
by setting the environment variable PIPX_DEFAULT_PYTHON
.
positional arguments:
package_spec package name(s) or pip installation spec(s)
options:
-h, --help show this help message and exit
--quiet, -q Give less output. May be used multiple times
corresponding to the WARNING, ERROR, and CRITICAL
logging levels.
--verbose, -v Give more output.
--include-deps Include apps of dependent packages
--force, -f Modify existing virtual environment and files in
PIPX_BIN_DIR and PIPX_MAN_DIR
--suffix SUFFIX Optional suffix for virtual environment and executable
names. NOTE: The suffix feature is experimental and
subject to change.
--python PYTHON Python to install with. Possible values can be the
executable name (python3.11), the version to pass to
py launcher (3.11), or the full path to the
executable.Requires Python 3.8 or above.
--preinstall PREINSTALL
Optional packages to be installed into the Virtual
Environment before installing the main package.
--system-site-packages
Give the virtual environment access to the system
site-packages dir.
--index-url INDEX_URL, -i INDEX_URL
Base URL of Python Package Index
--editable, -e Install a project in editable mode
--pip-args PIP_ARGS Arbitrary pip arguments to pass directly to pip
install/upgrade commands
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please find the solution first. This is a known issue. Please refer to pypa/pipx#359
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems pipx still does not have official solution for installing from a requirement file.
As confirmation of it-
recently opened PR and issue for: Preinstall from requirements file
pypa/pipx#1536
pypa/pipx#1525
If this PR will be merged seems will be standard possibility to use requirement file as syntax is:
pipx install -v --preinstall-from-file /tmp/httpx-req.txt --preinstall-from-file /tmp/attrs-req.txt dunk (it taken from the PR)
Another way by using additional packet:
pipx install cookiecutter
pipx runpip cookicutter install -r requirements.txt
But I can not run it as some downloaded packets have other hashes than in the file of requirements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. Will be added to the guide after pipx feature official release.
Additional steps need for install SCANOSS on Ubuntu 23.04, Fedora 38, Debian 11, etc.
Pull Request
Description
Additional steps need for install SCANOSS on Ubuntu 23.04, Fedora 38, Debian 11, etc.
These steps included in this PR that update documentation.
Fixes # (issue)
Users with last versions of OSes like Ubuntu may have problems with installing SCANOSS following current Guide.
Additional instructions for these users added.
Type of change
Please delete options that are not relevant.
Testing
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.
Test Configuration:
Checklist: