Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated call to pkg_resources #36

Merged
merged 10 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions .github/workflows/ci_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,17 @@ jobs:
envs: |
# Standard tests
# Linux builds - test on all supported PyQt5, PyQt6 and PySide2 versions
- linux: py37-test-pyqt510
- linux: py37-test-pyqt511
- linux: py37-test-pyqt512
- linux: py37-test-pyqt513
- linux: py39-test-pyqt515
- linux: py310-test-pyqt63
jfoster17 marked this conversation as resolved.
Show resolved Hide resolved
- linux: py311-test-pyqt514

- linux: py37-test-pyside513
- linux: py38-test-pyside514
- linux: py310-test-pyside515
- linux: py310-test-pyside63

# Test a few configurations on MacOS X (ask for arm64 with py310; may not be available yet)
- macos: py37-test-pyqt513
- macos: py38-test-pyqt514
- macos: py310-test-pyqt515
- macos: py311-test-pyqt515
PLAT: arm64
- macos: py310-test-pyqt63
PLAT: arm64
Expand All @@ -58,7 +53,6 @@ jobs:
- macos: py310-test-pyside63

# Test some configurations on Windows
- windows: py37-test-pyqt510
- windows: py38-test-pyqt514
- windows: py39-test-pyqt515
- windows: py310-test-pyqt63
Expand All @@ -67,15 +61,15 @@ jobs:
- windows: py310-test-pyside63

# Try out documentation build on Linux, macOS and Windows
- linux: py39-docs-pyqt513
- linux: py39-docs-pyqt514
coverage: false
- linux: py310-docs-pyqt63
coverage: false

- macos: py37-docs-pyqt513
- macos: py39-docs-pyqt515
coverage: false

- windows: py38-docs-pyqt513
- windows: py38-docs-pyqt514
coverage: false

publish:
Expand Down
12 changes: 7 additions & 5 deletions echo/version.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from pkg_resources import get_distribution, DistributionNotFound
import sys

if sys.version_info >= (3, 9):
import importlib.metadata as importlib_metadata
else:
import importlib_metadata

__all__ = ['__version__']

try:
__version__ = get_distribution('echo').version
except DistributionNotFound:
__version__ = 'undefined'
__version__ = importlib_metadata.version('echo')
10 changes: 6 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ classifiers =
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Natural Language :: English
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
jfoster17 marked this conversation as resolved.
Show resolved Hide resolved
Programming Language :: Python :: 3.11
Operating System :: OS Independent
Topic :: Utilities
license = MIT
Expand All @@ -23,11 +24,12 @@ long_description = file: README.rst
[options]
zip_safe = True
packages = find:
python_requires = >=3.6
python_requires = >=3.8
setup_requires = setuptools_scm
install_requires =
numpy
qtpy
importlib_metadata; python_version<'3.9'

[options.extras_require]
test =
Expand All @@ -39,4 +41,4 @@ docs =
numpydoc
sphinx-rtd-theme
qt =
PyQt5>=5.9
PyQt5>=5.14
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
py{37,38,39,310}-{codestyle,test,docs}-{pyqt510,pyqt511,pyqt512,pyqt513,pyqt514,pyqt515,pyside513,pyside514,pyside515,pyqt63,pyside63}
py{37,38,39,310,311}-{codestyle,test,docs}-{pyqt510,pyqt511,pyqt512,pyqt513,pyqt514,pyqt515,pyside513,pyside514,pyside515,pyqt63,pyside63}
requires = pip >= 18.0
setuptools >= 30.3.0

Expand Down