mirror of
https://github.com/anchore/syft.git
synced 2026-11-03 07:56:36 +01:00
Add python wheel egg relationships (#2903)
* add python package relationships Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * nil for empty relationships collections Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * new json schema for optional python requiremenets Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * update format snapshots for python packages Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * decompose python parsers more + add tests around plural fields Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * update JSON schema with python dep refs Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> --------- Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
This commit is contained in:
@@ -25,6 +25,12 @@ Classifier: Operating System :: OS Independent
|
||||
Classifier: Topic :: Text Processing :: Filters
|
||||
Classifier: Topic :: Utilities
|
||||
Requires-Python: >=3.5
|
||||
Description-Content-Type: text/markdown
|
||||
Requires-Dist: soupsieve (>1.2)
|
||||
Provides-Extra: html5lib
|
||||
Requires-Dist: html5lib ; extra == 'html5lib'
|
||||
Provides-Extra: lxml
|
||||
Requires-Dist: lxml ; extra == 'lxml'
|
||||
|
||||
|
||||
Pygments
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
# digest is for linux/amd64
|
||||
FROM ubuntu:20.04@sha256:cc9cc8169c9517ae035cf293b15f06922cb8c6c864d625a72b7b18667f264b70
|
||||
|
||||
# install Python 3.8 and Python 3.9
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update && apt-get install -y python3.8 python3.9 python3-pip python3-venv python3.9-venv python3.8-venv
|
||||
|
||||
# install pip and virtualenv for both Python versions
|
||||
RUN python3.8 -m pip install --upgrade pip virtualenv
|
||||
RUN python3.9 -m pip install --upgrade pip virtualenv
|
||||
|
||||
# install global packages for Python 3.8 & 3.9
|
||||
RUN python3.9 -m pip install click==8.0.3 beautifulsoup4==4.9.3 soupsieve==2.2.1 requests==2.25.1
|
||||
RUN python3.9 -m pip install six==1.16.0 wcwidth==0.2.13 blessed==1.20.0 python-editor==1.0.4 # total dependencies for inquirer in project1 (which is linked)
|
||||
RUN python3.9 -m pip install requests==2.25.0 certifi==2020.12.5 chardet==3.0.4 idna==2.10 urllib3==1.26.18 # total dependencies for requests
|
||||
|
||||
RUN python3.8 -m pip install click==8.0.2 beautifulsoup4==4.9.2 soupsieve==2.2.0 requests==2.25.0
|
||||
RUN python3.8 -m pip install runs==1.2.2 xmod==1.8.1 # partial dependencies for inquirer in project2 (which is a red herring)
|
||||
RUN python3.8 -m pip install requests==2.25.0 certifi==2020.12.5 chardet==3.0.4 idna==2.10 urllib3==1.26.18 # total dependencies for requests
|
||||
RUN python3.8 -m pip install readchar==4.1.0
|
||||
|
||||
# create directories for the two projects
|
||||
RUN mkdir -p /app/project1 /app/project2
|
||||
|
||||
# set up the first project with a virtual environment using Python 3.9
|
||||
WORKDIR /app/project1
|
||||
RUN python3.9 -m venv --system-site-packages venv
|
||||
RUN /app/project1/venv/bin/pip install pyyaml==5.4.1 beautifulsoup4==4.10.0 soupsieve==2.3.0 requests # note: use requests from global site packages, but use the rest from the virtual environment
|
||||
RUN /app/project1/venv/bin/pip install inquirer==3.0.0 # note: should use dependencies from global site packages
|
||||
|
||||
# set up the second project with a virtual environment using Python 3.8
|
||||
WORKDIR /app/project2
|
||||
RUN python3.8 -m venv venv
|
||||
RUN /app/project2/venv/bin/pip install click==8.0.3 pyyaml==6.0
|
||||
RUN /app/project2/venv/bin/pip install inquirer==3.2.4 runs==1.2.2 xmod==1.8.1 six==1.16.0 wcwidth==0.2.13 blessed==1.20.0 editor==1.6.6 readchar==4.1.0
|
||||
|
||||
WORKDIR /app
|
||||
@@ -0,0 +1,3 @@
|
||||
home = /usr/bin
|
||||
include-system-site-packages = true
|
||||
version = 3.9.5
|
||||
@@ -0,0 +1,17 @@
|
||||
|
||||
# last one wins... but we should survive multiple entries too
|
||||
include-system-site-packages = true
|
||||
include-system-site-packages = true
|
||||
|
||||
# note: empty lines
|
||||
|
||||
|
||||
|
||||
# note: bad entry
|
||||
include system-site-packages = false
|
||||
|
||||
# note: in comment
|
||||
# include-system-site-packages = false
|
||||
|
||||
# note: lots of spaces
|
||||
version = 3.3.3
|
||||
Reference in New Issue
Block a user