Skip to content

Commit

Permalink
Cleanup of conda-incubator & replace deprecated pkg_resources (#1045
Browse files Browse the repository at this point in the history
)

* remove matrix.py version from incubator

* replace deprecated package
  • Loading branch information
nikfilippas committed Mar 23, 2023
1 parent f66f18a commit d514c13
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ jobs:
- name: Set up conda
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.py }}
channels: conda-forge, defaults
channel-priority: strict
show-channel-urls: true
Expand Down
8 changes: 4 additions & 4 deletions pyccl/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# flake8: noqa E402
from pkg_resources import get_distribution, DistributionNotFound
from importlib.metadata import version, PackageNotFoundError
try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
__version__ = version(__name__)
except PackageNotFoundError:
# package is not installed
pass
del get_distribution, DistributionNotFound
del version, PackageNotFoundError

# Set the environment variable for default config path
from os import environ, path
Expand Down

0 comments on commit d514c13

Please sign in to comment.