Skip to content

Commit

Permalink
remove pkg_resources, use importlib (#24)
Browse files Browse the repository at this point in the history
* remove pkg_resources, use importlib
* update github actions
  • Loading branch information
mgeplf authored Feb 9, 2024
1 parent 3814b2a commit ec844d8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-sdist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
python setup.py sdist

- name: Publish distribution package to PyPI
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
2 changes: 1 addition & 1 deletion .github/workflows/run-tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
push:
branches:
- master
- main

jobs:
tests:
Expand Down
4 changes: 2 additions & 2 deletions atlas_direction_vectors/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""version"""
from pkg_resources import get_distribution # type: ignore
import importlib.metadata

VERSION = get_distribution("atlas_direction_vectors").version
VERSION = importlib.metadata.version("atlas_direction_vectors")
4 changes: 2 additions & 2 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import os
import sys

from pkg_resources import get_distribution
import importlib.metadata


# If extensions (or modules to document with autodoc) are in another directory,
Expand Down Expand Up @@ -52,7 +52,7 @@
# built documents.
#
# The short X.Y version.
version = get_distribution(project).version
version = importlib.metadata.version(project)
# The full version, including alpha/beta/rc tags.
release = version

Expand Down

0 comments on commit ec844d8

Please sign in to comment.