grawlix/shell.nix
^_^ 8f8b955ff4 feat: migrate to bbpb and platformdirs, add dependency version constraints
- Migrate from blackboxprotobuf to bbpb (new PyPI package name)
  - Update pyproject.toml and shell.nix dependencies
  - Import name remains 'blackboxprotobuf' (no code changes)
- Migrate from appdirs to platformdirs
  - Replace deprecated appdirs with actively maintained platformdirs
  - Update grawlix/config.py to use platformdirs.user_config_dir
  - Update dependency declarations in pyproject.toml and shell.nix
- Add minimum version constraints for all dependencies
  - Set requires-python = ">=3.9" (required by httpx and importlib.resources.files())
  - Add Python version classifiers (3.9-3.13)
  - Specify minimum versions: beautifulsoup4>=4.9.0, bbpb>=1.0.0,
    EbookLib>=0.17, httpx>=0.23.0, importlib-resources>=5.0,
    lxml>=4.6.0, platformdirs>=3.0.0, pycryptodome>=3.10.0, rich>=10.0.0
  - Make tomli conditional: only required for Python < 3.11
- Update shell.nix with correct SHA256 hash for bbpb 1.4.2
These changes ensure all dependencies meet minimum version requirements
for Python 3.9+ compatibility and replace deprecated packages with
actively maintained alternatives.
2025-10-29 12:44:42 +01:00

59 lines
1.1 KiB
Nix

with import <nixpkgs> {};
let
blackboxprotobuf = python3Packages.buildPythonPackage rec {
pname = "bbpb";
version = "1.4.2";
src = python3Packages.fetchPypi {
inherit pname version;
sha256 = "03446991bc500cfc9dd2049e6cc9489979e157c5ecb793e27936ab3d579d3496";
};
propagatedBuildInputs = with python3Packages; [
protobuf
];
doCheck = false;
};
ebooklib = python3Packages.buildPythonPackage rec {
pname = "EbookLib";
version = "0.18";
src = python3Packages.fetchPypi {
inherit pname version;
sha256 = "sha256-OFYmQ6e8lNm/VumTC0kn5Ok7XR0JF/aXpkVNtaHBpTM=";
};
propagatedBuildInputs = with python3Packages; [
six
lxml
];
};
in
mkShell {
buildInputs = [
(python3.withPackages(ps: with ps; [
beautifulsoup4
blackboxprotobuf
ebooklib
httpx
importlib-resources
lxml
platformdirs
pycryptodome
rich
tomli
# Test
pytest
mypy
types-requests
types-setuptools
# Build
build
setuptools
twine
]))
];
}