Skip to content

Commit

Permalink
Merge pull request #38 from abichinger/fix/use-packaging
Browse files Browse the repository at this point in the history
fix: use packaging instead of pkg_resources.packaging #37
  • Loading branch information
abichinger authored Jun 1, 2024
2 parents d8eaeba + 389fd79 commit 545d55c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/py/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ pip~=23.2
build~=1.0
setuptools~=68.2
twine~=4.0
tomlkit~=0.12
tomlkit~=0.12
packaging~=24.0
3 changes: 1 addition & 2 deletions lib/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import path from 'path';
async function normalizeVersion(version: string) {
const { stdout } = await execa('python3', [
'-c',
'import pkg_resources\n' +
`print(pkg_resources.packaging.version.Version('${version}'))`,
`from packaging.version import Version\nprint(Version('${version}'))`,
]);
return stdout;
}
Expand Down

0 comments on commit 545d55c

Please sign in to comment.