Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
enstools-encoding
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
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
w2w
enstools-encoding
Commits
aa61d987
Commit
aa61d987
authored
2 years ago
by
Oriol Tintó
Browse files
Options
Downloads
Patches
Plain Diff
Revert "Update how the package gets the version to avoid problem with pkg_resources"
This reverts commit
fa563a9f
.
parent
fa563a9f
No related branches found
No related tags found
Loading
Pipeline
#16822
passed
2 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
enstools/encoding/__init__.py
+4
-5
4 additions, 5 deletions
enstools/encoding/__init__.py
with
4 additions
and
5 deletions
enstools/encoding/__init__.py
+
4
−
5
View file @
aa61d987
# To have the Version number in a single place, there's a VERSION file in the package root directory.
# Here we read that file.
from
pathlib
import
Path
version_file
=
Path
(
__file__
).
resolve
().
parent
.
parent
.
parent
/
"
VERSION
"
__version__
=
version_file
.
read_text
().
strip
()
# to convert enstools into a namespace package, the version is now listed here and not in the level above
import
pkg_resources
# part of setuptools
version
=
pkg_resources
.
require
(
"
enstools-encoding
"
)[
0
].
version
__version__
=
version
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