Skip to content

Commit

Permalink
Get version dynamically from package metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
ecederstrand committed Mar 16, 2023
1 parent 2bb4d62 commit 90ebab2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sh.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
# ===============================================================================
__version__ = "2.0.0"
__project_url__ = "https://github.com/amoffat/sh"

import asyncio
from collections import deque

Expand Down Expand Up @@ -60,6 +57,7 @@
from asyncio import Queue as AQueue
from contextlib import contextmanager
from functools import partial
from importlib import metadata
from io import BytesIO, StringIO, UnsupportedOperation
from io import open as fdopen
from locale import getpreferredencoding
Expand All @@ -68,6 +66,9 @@
from types import GeneratorType, ModuleType
from typing import Any, Dict, Type, Union

__version__ = metadata.version("sh")
__project_url__ = "https://github.com/amoffat/sh"

if "windows" in platform.system().lower(): # pragma: no cover
raise ImportError(
"sh %s is currently only supported on linux and osx. \
Expand Down

0 comments on commit 90ebab2

Please sign in to comment.