Skip to content

Commit 7ea0b3a

Browse files
authored
Merge pull request NSLS2#263 from NSLS2/switch-to-pyproject
Update packaging to pyproject; Fix test errors from ophyd-async changes
2 parents 21706c2 + 70fe364 commit 7ea0b3a

15 files changed

Lines changed: 5476 additions & 4845 deletions

.github/workflows/tests.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
strategy:
1515
matrix:
16-
python-version: ["3.10", "3.11", "3.12"]
16+
python-version: ["3.11", "3.12", "3.13"]
1717

1818
fail-fast: false
1919
steps:
@@ -34,8 +34,7 @@ jobs:
3434
run: |
3535
set -vxeuo pipefail
3636
pip install --upgrade pip wheel
37-
pip install .
38-
pip install -r requirements-dev.txt
37+
pip install . --group dev
3938
pip list
4039
4140
- name: Test with pytest

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ ipython_log.py
22

33
*.code-workspace
44

5+
*/_version.py
6+
57
.idea/
68
.vscode/
79

MANIFEST.in

Lines changed: 0 additions & 11 deletions
This file was deleted.

nslsii/__init__.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,22 @@
22
import os
33
import sys
44
import warnings
5+
from importlib.metadata import PackageNotFoundError, version
56
from logging.handlers import SysLogHandler, TimedRotatingFileHandler
67
from pathlib import Path
78

89
import appdirs
910
from IPython import get_ipython
1011

1112
from .utils import open_redis_client
12-
from ._version import get_versions
13-
14-
__version__ = get_versions()["version"]
15-
del get_versions
1613

14+
try:
15+
from ._version import __version__
16+
except ImportError:
17+
try:
18+
__version__ = version("nslsii")
19+
except PackageNotFoundError:
20+
__version__ = "unknown"
1721

1822
bluesky_log_file_path = None
1923

0 commit comments

Comments
 (0)