Skip to content

Commit e2c0a98

Browse files
authored
use importlib instead (#408)
* use importlib instead * fix import logic for 3.7 * pull in gh pages fix
1 parent 85a649a commit e2c0a98

4 files changed

Lines changed: 11 additions & 5 deletions

File tree

.github/workflows/gh-pages.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ jobs:
1616
- uses: actions/checkout@v3
1717
with:
1818
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
19-
- name: "Install deps and build with Sphinx"
19+
- name: "Install runtime dependencies"
20+
run: "scripts/install"
21+
- name: "Install doc build deps and build with Sphinx"
2022
run: make docs
2123
- name: "Upload artifacts"
2224
uses: actions/upload-pages-artifact@v1

faust/__init__.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,15 @@
2121
import re
2222
import sys
2323
import typing
24-
from typing import Any, Mapping, NamedTuple, Optional, Sequence, Tuple
2524

26-
from setuptools_scm import get_version
25+
if sys.version_info < (3, 8):
26+
from importlib_metadata import version
27+
else:
28+
from importlib.metadata import version
29+
30+
from typing import Any, Mapping, NamedTuple, Optional, Sequence, Tuple
2731

28-
__version__ = get_version(root="../", relative_to=__file__)
32+
__version__ = version("faust-streaming")
2933
__author__ = "Robinhood Markets, Inc."
3034
__contact__ = "schrohm@gmail.com, vpatki@wayfair.com, williambbarnhart@gmail.com"
3135
__homepage__ = "https://github.com/faust-streaming/faust"

requirements/dist.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ twine
1111
vulture
1212
wheel>=0.29.0
1313
intervaltree
14+
importlib-metadata; python_version<'3.8'

requirements/requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@ mypy_extensions
1111
venusian==3.0.0
1212
intervaltree
1313
six
14-
setuptools_scm

0 commit comments

Comments
 (0)