Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
km3io
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
km3py
km3io
Commits
853c0dbb
Verified
Commit
853c0dbb
authored
1 year ago
by
Tamas Gal
Browse files
Options
Downloads
Patches
Plain Diff
Use importlib instead of pkg_resources
parent
62eb3626
No related branches found
No related tags found
No related merge requests found
Pipeline
#44508
failed
1 year ago
Stage: test
Stage: coverage
Stage: doc
Stage: release
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/conf.py
+6
-1
6 additions, 1 deletion
doc/conf.py
src/km3io/__init__.py
+6
-2
6 additions, 2 deletions
src/km3io/__init__.py
with
12 additions
and
3 deletions
doc/conf.py
+
6
−
1
View file @
853c0dbb
...
...
@@ -20,8 +20,13 @@ import sphinx_rtd_theme
from
pkg_resources
import
get_distribution
# -- Project information -----------------------------------------------------
try
:
from
importlib.metadata
import
version
as
get_version
version
=
get_version
(
__name__
)
except
ImportError
:
from
pkg_resources
import
get_distribution
version
=
get_distribution
(
__name__
).
version
version
=
get_distribution
(
"
km3io
"
).
version
short_version
=
"
.
"
.
join
(
version
.
split
(
"
.
"
)[:
2
])
project
=
"
km3io {}
"
.
format
(
short_version
)
copyright
=
"
{0}, Zineb Aly and Tamas Gal
"
.
format
(
date
.
today
().
year
)
...
...
This diff is collapsed.
Click to expand it.
src/km3io/__init__.py
+
6
−
2
View file @
853c0dbb
from
pkg_resources
import
get_distribution
,
DistributionNotFound
try
:
from
importlib.metadata
import
version
as
get_version
version
=
get_version
(
__name__
)
except
ImportError
:
from
pkg_resources
import
get_distribution
version
=
get_distribution
(
__name__
).
version
version
=
get_distribution
(
__name__
).
version
import
warnings
import
os
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment