Skip to content

Commit

Permalink
Bump bagit-python from 1.8.1 to 5b772435
Browse files Browse the repository at this point in the history
  • Loading branch information
sevein committed Apr 19, 2024
1 parent 9179e4a commit db24948
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 31 deletions.
28 changes: 0 additions & 28 deletions a3m/cli/__init__.py
Original file line number Diff line number Diff line change
@@ -1,28 +0,0 @@
import sys
from importlib.metadata import version


def shim_pkg_resources():
"""Injects a pkg_resources fake needed by bagit-python in Python 3.12.
The underlying error is only reproducible if setuptools is not installed.
"""

class Distribution:
def __init__(self, name):
self.version = version(name)

class FakeDistributionNotFound(Exception):
pass

def fake_get_distribution(_, name):
return Distribution(name)

class PkgResources:
DistributionNotFound = FakeDistributionNotFound
get_distribution = fake_get_distribution

sys.modules["pkg_resources"] = PkgResources() # type: ignore


shim_pkg_resources()
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies = [
# Used by client modules
"ammcpc~=0.1",
"metsrw~=0.4",
"bagit~=1.8",
"bagit @ git+https://github.com/LibraryOfCongress/bagit-python",
"lxml~=4.9",
"unidecode~=1.3",
"pygfried~=0.6",
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ attrs==23.2.0
# scriv
babel==2.14.0
# via sphinx
bagit==1.8.1
bagit @ git+https://github.com/LibraryOfCongress/bagit-python@5b7724356d8c5c3a3be9120814d4d996574485a9
boto3==1.34.84
botocore==1.34.84
# via
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ attrs==23.2.0
# via
# jsonschema
# referencing
bagit==1.8.1
bagit @ git+https://github.com/LibraryOfCongress/bagit-python@5b7724356d8c5c3a3be9120814d4d996574485a9
boto3==1.34.84
botocore==1.34.84
# via
Expand Down

0 comments on commit db24948

Please sign in to comment.