You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

gcpipwrap

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gcpipwrap - pypi Package Compare versions

Comparing version
0.1.5
to
0.1.6
+36
CLAUDE.md
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Project Overview
pipwrap (`gcpipwrap` on PyPI) is a Python wrapper around `pip install` that adds multi-index support and direct URL installs. It provides both a CLI (`pipwrap`) and a library API via the `PInst` class.
## Commands
```bash
uv sync # Install dependencies
uv run pytest -q # Run all tests
uv run pytest -q tests/test_installer.py # Run a single test file
uv run pytest -q tests/test_installer.py -k "test_name" # Run a single test
uv run ruff check . # Lint
uv run ruff format . # Format
```
## Architecture
- `pipwrap/installer.py` — Core logic. `PInst` class builds and executes pip commands via subprocess. First index URL becomes `--index-url`, extras become `--extra-index-url`. `trust_all_hosts` flag adds `--trusted-host` for each index.
- `pipwrap/cli.py` — CLI entrypoint (`pipwrap` command). Uses argparse. Registered as `project.scripts` in pyproject.toml.
- `pipwrap/logger.py` — Debug logging to `/tmp/pipwrap.log` with timestamps.
- `pipwrap/__init__.py` — Exports `PInst` as the public API.
## Build & Publish
- Build system: `hatchling` (wheel target packages `pipwrap/`)
- Published to PyPI as `gcpipwrap` via GitHub Actions on release (`.github/workflows/publish.yml`)
- Requires Python >=3.13
- Zero runtime dependencies
## Testing
Tests mock `subprocess.run` to avoid actual pip calls. Test files mirror the module structure under `tests/`.
+7
-0

@@ -12,3 +12,9 @@ """Wrapper around pip install with multi-index and URL support."""

def log(msg: str):
import tempfile
path = os.path.join(tempfile.gettempdir(), "log.txt")
with open(path, "a") as f:
f.write(f"{msg}\n")
class PInst:

@@ -41,2 +47,3 @@ """Wraps pip install with support for multiple indexes and URL installs."""

cmd.extend([flag, url])
log(f"{cmd}")
if (self.trust_all_hosts):

@@ -43,0 +50,0 @@ cmd.extend(["--trusted-host", f"{urlparse(url).netloc}"])

+2
-2
Metadata-Version: 2.4
Name: gcpipwrap
Version: 0.1.5
Version: 0.1.6
Summary: Wrapper around pip with multi-index and URL install support
Requires-Python: >=3.13
Requires-Python: >=3.9
Description-Content-Type: text/markdown

@@ -7,0 +7,0 @@

@@ -7,6 +7,6 @@ [build-system]

name = "gcpipwrap"
version = "0.1.5"
version = "0.1.6"
description = "Wrapper around pip with multi-index and URL install support"
readme = "README.md"
requires-python = ">=3.13"
requires-python = ">=3.9"
dependencies = []

@@ -13,0 +13,0 @@