Closed javihernandez closed 6 months ago
Hi @javihernandez,
I was able to re-create the issue. I was able to solve it by making some tweaks to the install step and setup.py. See the changes below:
pip install .
instead of python setup.py install
(env) (base) root@faa723da89bd:/alma-sbom# git diff
diff --git a/setup.py b/setup.py
index 825f3ab..3c79a9c 100644
--- a/setup.py
+++ b/setup.py
@@ -22,16 +22,12 @@ setup(
scripts=['alma_sbom.py'],
install_requires=[
'requests>=2.20.0',
- 'dataclasses>=0.8',
'cyclonedx-python-lib==2.7.1',
'spdx-tools==0.8',
'urllib3<2.0',
'packageurl-python==0.10.3',
'GitPython==3.1.29',
- 'immudb_wrapper',
- ],
- dependency_links=[
- 'git+https://github.com/AlmaLinux/immudb-wrapper.git@0.1.4#egg=immudb_wrapper'
+ 'immudb_wrapper @ git+https://github.com/AlmaLinux/immudb-wrapper.git@0.1.1#egg=immudb_wrapper',
],
python_requires=">=3.9",
)
More detail:
python setup.py
commands are deprecated. I tried using pip install .
instead of python setup.py install
and received an error ERROR: No matching distribution found for dataclasses>=0.8
. The reason is that dataclasses
was introduced in python 3.7 and the direct dependency is no longer needed. I removed dataclasses
from the setup.py here.'immudb_wrapper @ git+https://github.com/AlmaLinux/immudb-wrapper.git@0.1.1#egg=immudb_wrapper',
to install_requires
to solve this errorERROR: Could not find a version that satisfies the requirement immudb_wrapper (from alma-sbom) (from versions: none)
ERROR: No matching distribution found for immudb_wrapper
I'm going to close this issue but please feel free to open a new issue if you have additional questions.
Thank you for taking the time to look at this @parthea, and for your advice on it. Yes, using pip
solves the issue for sure, and moving over pip
to install deps is the way to go, so :+1: . Regarding dataclasses, yes, we already had a PR taking care of it. No more questions on my side, this can be closed for sure, thanks a lot again!
First, I'm not sure whether this bug report belongs here or elsewhere, move it to the appropriate place if needed.
We are having a weird problem than can only be reproduced in AlmaLinux 9, and based on investigations, it's directly related to setuptools and how it deals with dependencies. The original report in our project can be found here and it already includes information about what's going on.
Environment details
googleapis-common-protos
version: > 1.61.0Steps to reproduce
python3 -m venv env && source env/bin/activate
python setup.py install
python --help
Stack trace
As a temporary solution, and since these deps are being pulled by one 3rd party dep of us (immudb-py), we have added both
googleapis-common-protos==1.61.0
andprotobuf==3.20.3
as dependencies of ourimmudb-wrapper
and it solved the issue. However, I would like to know whether this is a problem in your side, or in setuptools' side of things.