Check if package dependencies are available in Fedora. Supports Rust, Python, and more.
Project description
Woolly
Check if package dependencies are available in Fedora. Supports multiple languages including Rust and Python.
This tool is merely a starting point for figuring out how much packaging effort you will need to bring a package over to Fedora.
What does "woolly" means?
Nothing. I just liked the name.
Supported Languages
| Language | Registry | CLI Flag |
|---|---|---|
| Rust | crates.io | --lang rust (default) |
| Python | PyPI | --lang python |
More languages can be easily added by implementing the LanguageProvider interface.
Installation
# Using uv
uv pip install .
# Or run directly
uv run woolly --help
Usage
# Check a Rust crate (default)
woolly ripgrep
# Check a Rust crate explicitly
woolly --lang rust serde
# Check a Python package
woolly --lang python requests
# Use language aliases
woolly -l py flask
woolly -l rs tokio
# List available languages
woolly --list-languages
# Clear cache
woolly --clear-cache
Example Output
Rust
$ woolly cliclack
Analyzing Rust package: cliclack
Registry: crates.io
Cache directory: /home/user/.cache/woolly
Analyzing Rust dependencies ━━━━━━━━━━━━━━━━━ 100% • 0:00:15 complete!
Dependency Summary for 'cliclack' (Rust)
╭────────────────────────────┬───────╮
│ Metric │ Value │
├────────────────────────────┼───────┤
│ Total dependencies checked │ 7 │
│ Packaged in Fedora │ 0 │
│ Missing from Fedora │ 1 │
╰────────────────────────────┴───────╯
Missing packages that need packaging:
• cliclack
Dependency Tree:
cliclack v0.3.6 • ✗ not packaged
├── console v0.16.1 • ✓ packaged (0.16.1)
│ ├── encode_unicode v1.0.0 • ✓ packaged (1.0.0)
│ └── windows-sys v0.61.2 • ✗ not packaged
...
Python
$ woolly --lang python requests
Analyzing Python package: requests
Registry: PyPI
Cache directory: /home/user/.cache/woolly
Analyzing Python dependencies ━━━━━━━━━━━━━━ 100% • 0:00:05 complete!
Dependency Summary for 'requests' (Python)
╭────────────────────────────┬───────╮
│ Metric │ Value │
├────────────────────────────┼───────┤
│ Total dependencies checked │ 5 │
│ Packaged in Fedora │ 5 │
│ Missing from Fedora │ 0 │
╰────────────────────────────┴───────╯
Dependency Tree:
requests v2.32.3 • ✓ packaged (2.32.3) [python3-requests]
├── charset-normalizer v3.4.0 • ✓ packaged (3.4.0) [python3-charset-normalizer]
├── idna v3.10 • ✓ packaged (3.10) [python3-idna]
├── urllib3 v2.2.3 • ✓ packaged (2.2.3) [python3-urllib3]
└── certifi v2024.8.30 • ✓ packaged (2024.8.30) [python3-certifi]
Adding a New Language
To add support for a new language, create a new provider in woolly/languages/:
# woolly/languages/go.py
from typing import Optional
import requests
from woolly.cache import DEFAULT_CACHE_TTL, read_cache, write_cache
from woolly.languages.base import Dependency, LanguageProvider, PackageInfo
class GoProvider(LanguageProvider):
"""Provider for Go modules."""
# Required class attributes
name = "go"
display_name = "Go"
registry_name = "Go Modules"
fedora_provides_prefix = "golang"
cache_namespace = "go"
# Only these two methods are required to implement:
def fetch_package_info(self, package_name: str) -> Optional[PackageInfo]:
"""Fetch package info from proxy.golang.org."""
# Your implementation here
...
def fetch_dependencies(self, package_name: str, version: str) -> list[Dependency]:
"""Fetch dependencies from go.mod."""
# Your implementation here
...
# Optional: Override these if your language has special naming conventions
def normalize_package_name(self, package_name: str) -> str:
"""Normalize package name for Fedora lookup."""
return package_name
def get_alternative_names(self, package_name: str) -> list[str]:
"""Alternative names to try if package not found."""
return []
Then register it in woolly/languages/__init__.py:
from woolly.languages.go import GoProvider
PROVIDERS: dict[str, type[LanguageProvider]] = {
"rust": RustProvider,
"python": PythonProvider,
"go": GoProvider, # Add new provider
}
ALIASES: dict[str, str] = {
# ... existing aliases
"golang": "go",
}
Notes
Keep in mind that you may not need all of the packages to be present in Fedora.
For example, Rust crates may have platform-specific dependencies (like windows* crates)
that aren't used on Linux.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file woolly-0.2.0.tar.gz.
File metadata
- Download URL: woolly-0.2.0.tar.gz
- Upload date:
- Size: 96.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8464081f4c22403f9670724b69115dfe7239d2d4765619826d86a9260777326
|
|
| MD5 |
4488bb33b65ac245e662791e5426a5f0
|
|
| BLAKE2b-256 |
21ce92e8714264998421d9d85fbdd509b78d2924e7e01f7234bf0237c730170a
|
File details
Details for the file woolly-0.2.0-py3-none-any.whl.
File metadata
- Download URL: woolly-0.2.0-py3-none-any.whl
- Upload date:
- Size: 27.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3a79e9319c3d6a0c46f892c23fbb9ba0bc8e6308282d5552afcc67460744baf
|
|
| MD5 |
12f65a9a09fb67036a66e83517254679
|
|
| BLAKE2b-256 |
ddd9c663caee918d21c9e38fad9d827b5dd5c029ca266945bf5f89d88d121840
|