Skip to content

Commit

Permalink
fix cibuildwheel: No build identifiers selected: BuildSelector(build_…
Browse files Browse the repository at this point in the history
…config='cp39-*', skip_config='*musllinux*', requires_python=<SpecifierSet('>=3.10')>, prerelease_pythons=False)
  • Loading branch information
janosh committed Sep 10, 2024
1 parent c469dd8 commit 48e7c98
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-14, windows-latest]
python-version: ["39", "310", "311", "312"]
python-version: ["310", "311", "312"]
runs-on: ${{ matrix.os }}
steps:
- name: Check out repo
Expand Down
11 changes: 5 additions & 6 deletions src/pymatgen/io/abinit/pseudos.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,11 @@ class Pseudo(MSONable, abc.ABC):
"""

@classmethod
def as_pseudo(cls, obj):
"""
Convert obj into a pseudo. Accepts:
def as_pseudo(cls, obj: Self | str) -> Self:
"""Convert obj into a Pseudo.
* Pseudo object.
* string defining a valid path.
Args:
obj (str | Pseudo): Path to the pseudo file or a Pseudo object.
"""
return obj if isinstance(obj, cls) else cls.from_file(obj)

Expand Down Expand Up @@ -227,7 +226,7 @@ def compute_md5(self):
text = file.read()
# usedforsecurity=False needed in FIPS mode (Federal Information Processing Standards)
# https://github.com/materialsproject/pymatgen/issues/2804
md5 = hashlib.new("md5", usedforsecurity=False) # hashlib.md5(usedforsecurity=False) is py39+
md5 = hashlib.md5(usedforsecurity=False)
md5.update(text.encode("utf-8"))
return md5.hexdigest()

Expand Down
2 changes: 1 addition & 1 deletion src/pymatgen/io/cp2k/inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2327,7 +2327,7 @@ def get_hash(self) -> str:
"""Get a hash of this object."""
# usedforsecurity=False needed in FIPS mode (Federal Information Processing Standards)
# https://github.com/materialsproject/pymatgen/issues/2804
md5 = hashlib.new("md5", usedforsecurity=False) # hashlib.md5(usedforsecurity=False) is py39+
md5 = hashlib.md5(usedforsecurity=False)
md5.update(self.get_str().lower().encode("utf-8"))
return md5.hexdigest()

Expand Down
4 changes: 2 additions & 2 deletions src/pymatgen/io/vasp/inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2028,7 +2028,7 @@ def md5_computed_file_hash(self) -> str:
"""MD5 hash of the entire PotcarSingle."""
# usedforsecurity=False needed in FIPS mode (Federal Information Processing Standards)
# https://github.com/materialsproject/pymatgen/issues/2804
md5 = hashlib.new("md5", usedforsecurity=False) # hashlib.md5(usedforsecurity=False) is py39+
md5 = hashlib.md5(usedforsecurity=False)
md5.update(self.data.encode("utf-8"))
return md5.hexdigest()

Expand Down Expand Up @@ -2064,7 +2064,7 @@ def md5_header_hash(self) -> str:
self.hash_str = hash_str
# usedforsecurity=False needed in FIPS mode (Federal Information Processing Standards)
# https://github.com/materialsproject/pymatgen/issues/2804
md5 = hashlib.new("md5", usedforsecurity=False) # hashlib.md5(usedforsecurity=False) is py39+
md5 = hashlib.md5(usedforsecurity=False)
md5.update(hash_str.lower().encode("utf-8"))
return md5.hexdigest()

Expand Down

0 comments on commit 48e7c98

Please sign in to comment.