diff --git a/.github/workflows/publish-to-test-pypi.yml b/.github/workflows/publish-to-test-pypi.yml index 2e0ce698..cec62bf6 100644 --- a/.github/workflows/publish-to-test-pypi.yml +++ b/.github/workflows/publish-to-test-pypi.yml @@ -18,7 +18,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v1 with: - python-version: 3.7 + python-version: 3.13 - name: Install pep517 run: >- python -m pip install pep517 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1f58c1f6..34794845 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: fail-fast: false max-parallel: 4 matrix: - python-version: [2.7, 3.7, 3.8, 3.9, "3.10", "3.11", "3.12-dev"] + python-version: [2.7, 3.7, 3.8, 3.9, "3.10", "3.11", "3.12", "3.13"] steps: - name: Checkout Code diff --git a/README.md b/README.md index f86f661a..510c90a2 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ pycoin -- Python Cryptocoin Utilities ===================================== The pycoin library implements many utilities useful when dealing with bitcoin and some bitcoin-like -alt-coins. It has been tested with Python 2.7, 3.6 and 3.7. +alt-coins. It has been tested with Python 2.7, 3.7-3.13. See also [pycoinnet](http://github.com/richardkiss/pycoinnet/) for a library that speaks the bitcoin protocol. diff --git a/pycoin/__init__.py b/pycoin/__init__.py index ffe2208c..ef853897 100644 --- a/pycoin/__init__.py +++ b/pycoin/__init__.py @@ -1,16 +1,21 @@ -from pkg_resources import get_distribution, DistributionNotFound +version = "unknown" try: + from pkg_resources import get_distribution + version = get_distribution(__name__).version -except DistributionNotFound: - # package is not installed - version = "unknown" +except ImportError: + from importlib.metadata import version + + version = version("pycoin") +except Exception: + pass -__title__ = 'pycoin' -__author__ = 'Richard Kiss' +__title__ = "pycoin" +__author__ = "Richard Kiss" __version__ = version -__license__ = 'MIT' -__copyright__ = 'Copyright 2018 Richard Kiss' +__license__ = "MIT" +__copyright__ = "Copyright 2018 Richard Kiss" """ :copyright: (c) 2018 by Richard Kiss