{"id":28984327,"url":"https://github.com/mestadler/pipd","last_synced_at":"2025-10-07T15:50:08.776Z","repository":{"id":295705954,"uuid":"990971764","full_name":"mestadler/pipd","owner":"mestadler","description":"Python Package Installer for Debian - Bridge between APT and PyPI","archived":false,"fork":false,"pushed_at":"2025-05-27T00:07:51.000Z","size":48,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-24T17:06:24.835Z","etag":null,"topics":["apt","debian","package-manager","package-manager-tool","pep668","pip","pipx","python3","ubuntu"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mestadler.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-26T23:52:19.000Z","updated_at":"2025-05-27T00:07:54.000Z","dependencies_parsed_at":"2025-05-27T01:32:30.585Z","dependency_job_id":null,"html_url":"https://github.com/mestadler/pipd","commit_stats":null,"previous_names":["mestadler/pipd"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mestadler/pipd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mestadler%2Fpipd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mestadler%2Fpipd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mestadler%2Fpipd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mestadler%2Fpipd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mestadler","download_url":"https://codeload.github.com/mestadler/pipd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mestadler%2Fpipd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278802801,"owners_count":26048566,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apt","debian","package-manager","package-manager-tool","pep668","pip","pipx","python3","ubuntu"],"created_at":"2025-06-24T17:03:23.730Z","updated_at":"2025-10-07T15:50:08.771Z","avatar_url":"https://github.com/mestadler.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PIPD - Python Package Installer for Debian\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Python Version](https://img.shields.io/badge/python-3.8%2B-blue)](https://www.python.org/downloads/)\n[![Debian](https://img.shields.io/badge/Debian-compatible-red)](https://www.debian.org/)\n[![Ubuntu](https://img.shields.io/badge/Ubuntu-compatible-orange)](https://ubuntu.com/)\n\nPIPD is an advanced Python package management tool designed specifically for Debian-based systems. It bridges the gap between system package management (APT) and Python package management (PyPI), prioritizing system packages when available while providing seamless fallback to PyPI.\n\n## 🌟 Key Features\n\n- **🔍 Intelligent Package Resolution**: Automatically checks Debian repositories before PyPI\n- **🚀 Familiar CLI Interface**: Uses pip-like commands for ease of use  \n- **🛡️ Transaction Support**: Automatic rollback on installation failures\n- **📦 Package Conversion**: Converts PyPI packages to .deb format for system integration\n- **🔒 Security First**: Input validation, privilege checking, and safe execution\n- **⚡ Performance**: Built-in caching to reduce redundant network calls\n- **🎯 PEP 668 Compliant**: Works with externally managed Python environments\n\n## 📋 Table of Contents\n\n- [Why PIPD?](#-why-pipd)\n- [Installation](#-installation)\n- [Usage](#-usage)\n- [Configuration](#%EF%B8%8F-configuration)\n- [Architecture](#-architecture)\n- [Troubleshooting](#-troubleshooting)\n- [Contributing](#-contributing)\n- [License](#-license)\n\n## 🤔 Why PIPD?\n\nModern Debian/Ubuntu systems implement PEP 668, which prevents pip from installing packages system-wide to avoid conflicts. PIPD solves this by:\n\n1. **Prioritizing system packages**: Safer and more stable\n2. **Converting PyPI packages**: Creates proper .deb packages  \n3. **Managing dependencies**: Handles conflicts between system and PyPI packages\n4. **Providing rollback**: Failed installations don't leave your system broken\n\n## 🚀 Installation\n\n### Prerequisites\n\n- Debian-based system (Debian 11+, Ubuntu 20.04+)\n- Python 3.8 or higher\n- Root privileges for installation\n\n### Quick Install\n\n```bash\n# Clone the repository\ngit clone https://github.com/mestadler/pipd.git\ncd pipd\n\n# Run the installer\nsudo ./install-pipd.sh\n```\n\nThe installer will:\n- Detect available Python versions\n- Install system dependencies\n- Set up the PIPD environment\n- Configure logging and permissions\n\n### Manual Installation\n\nSee [docs/INSTALL.md](docs/INSTALL.md) for detailed manual installation instructions.\n\n## 📖 Usage\n\n### Basic Commands\n\n```bash\n# Install packages\nsudo pipd install requests numpy pandas\n\n# Install specific version\nsudo pipd install django==4.2\n\n# Install from requirements file\nsudo pipd install -r requirements.txt\n\n# List installed packages\npipd list\n\n# Show package information\npipd show requests\n\n# Uninstall packages\nsudo pipd uninstall requests\n```\n\n### Advanced Usage\n\n```bash\n# Force reinstall\nsudo pipd install --force-reinstall numpy\n\n# Upgrade packages\nsudo pipd install --upgrade django\n\n# List with different formats\npipd list --format json\npipd list --format simple\n\n# Verbose mode for debugging\nsudo pipd -v install tensorflow\n```\n\n## ⚙️ Configuration\n\nPIPD uses a TOML configuration file located at `/etc/pipd/config.toml`:\n\n```toml\n[general]\nprefer_system_packages = true\ncache_ttl = 3600\nverbose = false\n\n[sources]\ncheck_debian_first = true\nallow_pypi_fallback = true\n\n[security]\nverify_checksums = true\nsafe_mode = true\n```\n\nUser-specific configuration can be placed in `~/.config/pipd/config.toml`.\n\n## 🏗 Architecture\n\nPIPD follows a modular architecture:\n\n```\n┌─────────────────────────────────────────────────────┐\n│                    CLI Interface                     │\n│                  (Click-based CLI)                   │\n└─────────────────────────┬───────────────────────────┘\n                          │\n┌─────────────────────────┴───────────────────────────┐\n│                 PipdOrchestrator                     │\n│         (Main coordination component)                │\n└──────┬──────────┬─────────────┬──────────┬──────────┘\n       │          │             │          │\n┌──────┴────┐ ┌──┴──────┐ ┌────┴────┐ ┌──┴────────┐\n│ Package   │ │Debian   │ │ PyPI    │ │Dependency │\n│ Resolver  │ │Manager  │ │Manager  │ │ Resolver  │\n└───────────┘ └─────────┘ └─────────┘ └───────────┘\n```\n\n### Key Components\n\n- **PackageResolver**: Resolves packages across Debian and PyPI sources\n- **DebianPackageManager**: Handles APT operations\n- **PyPIPackageManager**: Downloads and converts PyPI packages\n- **DependencyResolver**: Manages dependency conflicts\n- **InstallationTransaction**: Provides rollback capability\n\n## 🔧 Troubleshooting\n\n### Common Issues\n\n#### PEP 668 Error\n```bash\nerror: externally-managed-environment\n```\nThis is expected! PIPD is designed to work with this restriction by converting packages to .deb format.\n\n#### Permission Denied\n```bash\nError: This script requires root privileges\n```\nSolution: Use `sudo pipd install \u003cpackage\u003e`\n\n#### Package Not Found\nPIPD searches Debian repositories first. If a package isn't found:\n1. Check the package name spelling\n2. Update package lists: `sudo apt update`\n3. The package might only be available on PyPI\n\n### Debug Mode\n\nEnable verbose logging for troubleshooting:\n```bash\nsudo pipd -v install \u003cpackage\u003e\n```\n\nCheck logs at `/var/log/pipd.log` for detailed information.\n\n## 🤝 Contributing\n\nWe welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\n\n### Development Setup\n\n```bash\n# Clone the repository\ngit clone https://github.com/mestadler/pipd.git\ncd pipd\n\n# Create virtual environment\npython3 -m venv venv\nsource venv/bin/activate\n\n# Install development dependencies\npip install -r requirements-dev.txt\n\n# Run tests\npython -m pytest tests/\n```\n\n## 📊 Comparison with Other Tools\n\n| Feature | PIPD | pip | pipx | apt |\n|---------|------|-----|------|-----|\n| System package priority | ✅ | ❌ | ❌ | ✅ |\n| PyPI packages | ✅ | ✅ | ✅ | ❌ |\n| .deb conversion | ✅ | ❌ | ❌ | N/A |\n| Transaction rollback | ✅ | ❌ | ❌ | ✅ |\n| PEP 668 compliant | ✅ | ❌ | ✅ | N/A |\n\n## 🛡️ Security\n\nPIPD implements several security measures:\n- Input validation for package names\n- Privilege checking before system modifications\n- Secure subprocess execution\n- Optional checksum verification\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n- Debian packaging team for the robust APT system\n- Python Software Foundation for pip and venv\n- py2deb and stdeb developers for package conversion tools\n- Click developers for the excellent CLI framework\n\n## 📞 Support\n\n- **Issues**: [GitHub Issues](https://github.com/mestadler/pipd/issues)\n- **Discussions**: [GitHub Discussions](https://github.com/mestadler/pipd/discussions)\n- **Wiki**: [Project Wiki](https://github.com/mestadler/pipd/wiki)\n\n---\n\nMade with ❤️ for the Debian/Ubuntu Python community\n\n## 📚 Documentation\n\n- [**Installation Guide**](docs/INSTALL.md) - Detailed installation instructions\n- [**User Manual**](docs/MANUAL.md) - Comprehensive usage documentation  \n- [**PEP 668 Guide**](docs/PEP668.md) - Understanding PEP 668 and how PIPD handles it\n- [**Python Compatibility**](docs/PYTHON_COMPATIBILITY.md) - Python version support details\n- [**Contributing**](CONTRIBUTING.md) - How to contribute to PIPD\n\n## 📁 Project Structure\npipd/\n├── pipd                    # Main executable\n├── install-pipd.sh         # Installation script\n├── install-python312-debian.sh  # Python 3.12 installer\n├── README.md              # This file\n├── LICENSE                # MIT License\n├── CONTRIBUTING.md        # Contribution guidelines\n├── docs/                  # Documentation\n│   ├── INSTALL.md         # Installation guide\n│   ├── MANUAL.md          # User manual\n│   ├── PEP668.md          # PEP 668 explanation\n│   └── PYTHON_COMPATIBILITY.md\n├── examples/              # Example configurations\n│   ├── config.toml.example\n│   └── requirements-example.txt\n├── tests/                 # Test suite\n│   └── test_pipd.py\n└── scripts/               # Utility scripts\n├── fix-pipd.sh\n└── github-script.sh\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmestadler%2Fpipd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmestadler%2Fpipd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmestadler%2Fpipd/lists"}