This repository has been archived by the owner on Nov 26, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
trappy: set the version using an explicit file
There is no pythonic way of specifying the version of a project, [0] describes 7 (seven!) ways of doing it. We were currently using method 5, setting the value in setup.py and using pkg_resources to get it from the installed version. This works ok if you have installed the package using "python setup.py" or pip, but fails if you are importing trappy from a checkout, which is what lisa do. Even worse, if you import it from lisa but have an old trappy version installed, trappy.__version__ will tell you the version of the installed trappy, not the one you have imported and are using. Switch to use a version.py file that's distributed with the project (method 3). trappy.__version__ now reads the imported trappy's version, which is what you want. setup.py and the documentation read the file when they are installing so as to avoid repeating the version number there. [0] https://packaging.python.org/en/latest/single_source_version/
- Loading branch information
Javi Merino
committed
Jun 16, 2016
1 parent
8899094
commit 712e6f9
Showing
4 changed files
with
22 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copyright 2016-2016 ARM Limited | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
__version__ = "5.5.0" |