File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 15
15
16
16
import os
17
17
from distutils .core import setup
18
- from io import open
19
18
from setuptools import find_packages
20
- #import mbed_os_tools
21
19
22
20
DESCRIPTION = "The tools to build, test, and work with Mbed OS"
23
21
OWNER_NAMES = "Jimmy Brisson, Brian Daniels"
26
24
27
25
# Utility function to cat in a file (used for the README)
28
26
def read (fname ):
29
- return open (os .path .join (os .path .dirname (__file__ ), fname ), encoding = "utf8" ).read ()
27
+ with open (os .path .join (os .path .dirname (__file__ ), fname ), 'r' ) as f :
28
+ return f .read ()
30
29
31
30
32
31
setup (
33
32
name = "mbed-os-tools" ,
34
- version = '0.0.1' ,
33
+ version = read ( "src/mbed_os_tools/VERSION.txt" ) ,
35
34
description = DESCRIPTION ,
36
35
long_description = read ("README.md" ),
37
36
author = OWNER_NAMES ,
@@ -41,6 +40,7 @@ def read(fname):
41
40
url = "https://github.com/ARMmbed/mbed-os-tools" ,
42
41
packages = find_packages ("src" ),
43
42
package_dir = {"" : "src" },
43
+ package_data = {"" : ["VERSION.txt" ]},
44
44
license = "Apache-2.0" ,
45
45
test_suite = "test" ,
46
46
install_requires = [
Original file line number Diff line number Diff line change
1
+ 0.0.1
Original file line number Diff line number Diff line change 13
13
# See the License for the specific language governing permissions and
14
14
# limitations under the License.
15
15
16
- __version__ = "0.0.1"
16
+ import os
17
+
18
+ _version_file_path = os .path .join (os .path .dirname (__file__ ), "VERSION.txt" )
19
+ with open (_version_file_path , 'r' ) as _version_file :
20
+ __version__ = _version_file .read ().strip ()
You can’t perform that action at this time.
0 commit comments