Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rules/ptf-py3.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ptf package

PTF_PY3 = ptf-0.9.3-py3-none-any.whl
PTF_PY3 = ptf-0.10.0.post0-py3-none-any.whl
$(PTF_PY3)_SRC_PATH = $(SRC_PATH)/ptf-py3
$(PTF_PY3)_PYTHON_VERSION = 3
$(PTF_PY3)_TEST = n
Expand Down
5 changes: 4 additions & 1 deletion sonic-slave-bookworm/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ RUN pip3 install virtualenv
RUN mkdir /python_virtualenv
RUN cd /python_virtualenv && python3 -m virtualenv --copies -p /usr/bin/python3 env3

RUN PATH=/python_virtualenv/env3/bin/:$PATH pip3 install setuptools==66.1.1 wheel==0.38.4 fastentrypoints pytest pytest-cov pytest-runner==5.2 nose==1.3.7 mockredispy==2.9.3 mock==3.0.5 PyYAML==6.0.1 redis==3.5.3 pexpect==4.8.0 Pympler==0.8 parameterized natsort==6.2.1 MarkupSafe==2.0.1 Jinja2==3.0.3 click tabulate netaddr netifaces pyroute2 pyfakefs sphinx && ln -s /python_virtualenv/env3/bin/pytest /python_virtualenv/env3/bin/pytest-3
RUN PATH=/python_virtualenv/env3/bin/:$PATH pip3 install setuptools==66.1.1 setuptools-scm==8.0.4 setuptools-scm-git-archive==1.4.1 wheel==0.38.4 fastentrypoints pytest pytest-cov pytest-runner==5.2 nose==1.3.7 mockredispy==2.9.3 mock==3.0.5 PyYAML==6.0.1 redis==3.5.3 pexpect==4.8.0 Pympler==0.8 parameterized natsort==6.2.1 MarkupSafe==2.0.1 Jinja2==3.0.3 click tabulate netaddr netifaces pyroute2 pyfakefs sphinx && ln -s /python_virtualenv/env3/bin/pytest /python_virtualenv/env3/bin/pytest-3

RUN apt-get --fix-broken install -y
RUN LIBPYTHON3_DEPS="`apt-cache depends libpython3-dev:$arch |grep Depends|awk {'print \$2;'}|tr "\n" " "`" && apt-get install -y libpython2.7-dev:$arch $LIBPYTHON3_DEPS libxml2-dev:$arch libxslt-dev:$arch libssl-dev:$arch libz-dev:$arch
Expand Down Expand Up @@ -510,6 +510,9 @@ RUN pip3 install pyang==2.4.0
# For mgmt-framework build
RUN pip3 install mmh3==2.5.1

# For ptf-py3 0.10.0
RUN pip3 install setuptools==66.1.1 setuptools-scm==8.0.4 setuptools-scm-git-archive==1.4.1

RUN apt-get install -y xsltproc

# Install dependencies for isc-dhcp-relay build
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
From 5e46050967f5c29c6572b318d9aebb184f8275cf Mon Sep 17 00:00:00 2001
From: Vivek Reddy <vkarri@nvidia.com>
Date: Wed, 21 Feb 2024 19:04:40 +0000
Subject: [PATCH] Avoid local version scheme by setuptools-scm

Signed-off-by: Vivek Reddy <vkarri@nvidia.com>
---
pyproject.toml | 1 +
1 file changed, 1 insertion(+)

diff --git a/pyproject.toml b/pyproject.toml
index 74a5350..33af092 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -11,4 +11,5 @@ build-backend = 'setuptools.build_meta'
root = "./"
# use current tag and not next one
version_scheme = "post-release"
+local_scheme = "no-local-version"
write_to = "src/ptf/_version.py"
--
2.17.1

3 changes: 2 additions & 1 deletion src/ptf-py3.patch/series
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
0001-Remove-ord-in-get_mac-to-avoid-TypeError.patch
0002-Fill-byte-formatted-client-mac-address-in-DHCP-Disco.patch
0002-Fill-byte-formatted-client-mac-address-in-DHCP-Disco.patch
0003-Avoid-local-version-scheme-by-setuptools-scm.patch