Install this version:
emerge -a =dev-python/semgrep-1.160.0
If this version is masked, you can unmask it using the autounmask tool or standard emerge options:
autounmask =dev-python/semgrep-1.160.0
Or alternatively:
emerge --autounmask-write -a =dev-python/semgrep-1.160.0
| Version | EAPI | Keywords | Slot |
|---|---|---|---|
| 1.160.0 | 8 | ~amd64 | 0 |
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{12..13} )
inherit distutils-r1
DESCRIPTION="Lightweight static analysis for many languages"
HOMEPAGE="https://github.com/semgrep/semgrep"
# The Python package lives under the monorepo's cli/ directory.
S="${WORKDIR}/${P}/cli"
LICENSE="LGPL-2.1"
SLOT="0"
# semgrep-interfaces is a submodule in semgrep/semgrep; use matching release tag by default.
SI_PV="${PV}"
if [[ ${PV} == 9999 ]]; then
PROPERTIES="live"
EGIT_REPO_URI="https://github.com/semgrep/semgrep.git"
EGIT_BRANCH="develop"
# Only fetch the submodule we actually need.
EGIT_SUBMODULES=( "OSS/cli/src/semgrep/semgrep_interfaces" )
inherit git-r3
else
KEYWORDS="~amd64"
SRC_URI="
https://github.com/${PN}/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz
https://github.com/${PN}/${PN}-interfaces/archive/refs/tags/v${SI_PV}.tar.gz -> ${PN}-interfaces-${SI_PV}.gh.tar.gz
"
fi
RDEPEND="
>=dev-python/attrs-21.3[${PYTHON_USEDEP}]
>=dev-python/boltons-21.0[${PYTHON_USEDEP}]
>=dev-python/click-option-group-0.5[${PYTHON_USEDEP}]
>=dev-python/click-8.1.8[${PYTHON_USEDEP}]
>=dev-python/colorama-0.4.0[${PYTHON_USEDEP}]
>=dev-python/exceptiongroup-1.2.0[${PYTHON_USEDEP}]
>=dev-python/glom-23.3[${PYTHON_USEDEP}]
>=dev-python/jsonschema-4.25.1[${PYTHON_USEDEP}]
>=dev-python/mcp-1.23.3[${PYTHON_USEDEP}]
>=dev-python/packaging-21.0[${PYTHON_USEDEP}]
>=dev-python/peewee-3.14[${PYTHON_USEDEP}]
>=dev-python/pyjwt-2.12.0[${PYTHON_USEDEP}]
>=dev-python/cryptography-3.4.0[${PYTHON_USEDEP}]
>=dev-python/requests-2.22[${PYTHON_USEDEP}]
>=dev-python/rich-13.5.2[${PYTHON_USEDEP}]
>=dev-python/ruamel-yaml-0.18.15[${PYTHON_USEDEP}]
>=dev-python/ruamel-yaml-clib-0.2.14[${PYTHON_USEDEP}]
>=dev-python/semantic-version-2.10.0[${PYTHON_USEDEP}]
>=dev-python/tomli-2.0.1[${PYTHON_USEDEP}]
>=dev-python/typing-extensions-4.2[${PYTHON_USEDEP}]
>=dev-python/urllib3-2.0[${PYTHON_USEDEP}]
>=dev-python/wcmatch-8.3[${PYTHON_USEDEP}]
>=dev-python/opentelemetry-api-1.37.0[${PYTHON_USEDEP}]
>=dev-python/opentelemetry-sdk-1.37.0[${PYTHON_USEDEP}]
>=dev-python/opentelemetry-exporter-otlp-proto-http-1.37.0[${PYTHON_USEDEP}]
>=dev-python/opentelemetry-instrumentation-requests-0.58[${PYTHON_USEDEP}]
>=dev-python/opentelemetry-instrumentation-threading-0.58[${PYTHON_USEDEP}]
dev-util/semgrep-core-bin
"
DEPEND="${RDEPEND}"
src_unpack() {
if [[ ${PV} == 9999 ]]; then
git-r3_src_unpack
else
# For release tarballs, overlay the semgrep-interfaces tarball into the
# monorepo's interfaces/ directory (upstream uses it as a submodule).
rm -rf "${WORKDIR}/${P}/cli/src/semgrep/semgrep_interfaces" || die
mv "${WORKDIR}/${PN}-interfaces-${SI_PV}" "${WORKDIR}/${P}/cli/src/semgrep/semgrep_interfaces" || die
default
fi
}
python_prepare_all() {
# Avoid test installs pulling in extra deps / causing sandbox/network issues.
# Do not fail if upstream moved/removed tests directory.
rm -rf tests
# Old ebuild carried a setup.py constraint relax; keep it only if present.
if [[ -f setup.py ]]; then
sed -i -e 's|~=|>=|g' setup.py || die
fi
distutils-r1_python_prepare_all
}
python_compile() {
export SEMGREP_SKIP_BIN=true
distutils-r1_python_compile
}
>=dev-python/attrs-21.3[] >=dev-python/boltons-21.0[] >=dev-python/click-option-group-0.5[] >=dev-python/click-8.1.8[] >=dev-python/colorama-0.4.0[] >=dev-python/exceptiongroup-1.2.0[] >=dev-python/glom-23.3[] >=dev-python/jsonschema-4.25.1[] >=dev-python/mcp-1.23.3[] >=dev-python/packaging-21.0[] >=dev-python/peewee-3.14[] >=dev-python/pyjwt-2.12.0[] >=dev-python/cryptography-3.4.0[] >=dev-python/requests-2.22[] >=dev-python/rich-13.5.2[] >=dev-python/ruamel-yaml-0.18.15[] >=dev-python/ruamel-yaml-clib-0.2.14[] >=dev-python/semantic-version-2.10.0[] >=dev-python/tomli-2.0.1[] >=dev-python/typing-extensions-4.2[] >=dev-python/urllib3-2.0[] >=dev-python/wcmatch-8.3[] >=dev-python/opentelemetry-api-1.37.0[] >=dev-python/opentelemetry-sdk-1.37.0[] >=dev-python/opentelemetry-exporter-otlp-proto-http-1.37.0[] >=dev-python/opentelemetry-instrumentation-requests-0.58[] >=dev-python/opentelemetry-instrumentation-threading-0.58[] dev-util/semgrep-core-bin
>=dev-python/attrs-21.3[] >=dev-python/boltons-21.0[] >=dev-python/click-option-group-0.5[] >=dev-python/click-8.1.8[] >=dev-python/colorama-0.4.0[] >=dev-python/exceptiongroup-1.2.0[] >=dev-python/glom-23.3[] >=dev-python/jsonschema-4.25.1[] >=dev-python/mcp-1.23.3[] >=dev-python/packaging-21.0[] >=dev-python/peewee-3.14[] >=dev-python/pyjwt-2.12.0[] >=dev-python/cryptography-3.4.0[] >=dev-python/requests-2.22[] >=dev-python/rich-13.5.2[] >=dev-python/ruamel-yaml-0.18.15[] >=dev-python/ruamel-yaml-clib-0.2.14[] >=dev-python/semantic-version-2.10.0[] >=dev-python/tomli-2.0.1[] >=dev-python/typing-extensions-4.2[] >=dev-python/urllib3-2.0[] >=dev-python/wcmatch-8.3[] >=dev-python/opentelemetry-api-1.37.0[] >=dev-python/opentelemetry-sdk-1.37.0[] >=dev-python/opentelemetry-exporter-otlp-proto-http-1.37.0[] >=dev-python/opentelemetry-instrumentation-requests-0.58[] >=dev-python/opentelemetry-instrumentation-threading-0.58[] dev-util/semgrep-core-bin
| Type | File | Size | Source URLs |
|---|---|---|---|
| DIST | semgrep-1.160.0.gh.tar.gz | 11379141 bytes | https://github.com/semgrep/semgrep/archive/refs/tags/v1.160.0.tar.gz |
| DIST | semgrep-interfaces-1.160.0.gh.tar.gz | 442640 bytes | https://github.com/semgrep/semgrep-interfaces/archive/refs/tags/v1.160.0.tar.gz |