File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env python3
2
2
3
3
import os
4
+ import re
4
5
from setuptools import setup
5
6
6
7
def read (fname ):
7
- with open (os .path .join (os .path .dirname (__file__ ), fname )) as f :
8
- return f .read ()
8
+ with open (os .path .join (os .path .dirname (__file__ ), fname )) as fildes :
9
+ return fildes .read ()
10
+
11
+ def get_version ():
12
+ with open ('vhdeps/__init__.py' , 'r' ) as fildes :
13
+ for line in fildes :
14
+ match = re .match ("__version__ = '([^']+)'\n " , line )
15
+ if match :
16
+ return match .group (1 )
17
+ raise ValueError ('Could not find package version' )
9
18
10
19
setup (
11
20
name = "vhdeps" ,
12
- version = "0.0.3" ,
21
+ version = get_version () ,
13
22
author = "Jeroen van Straten" ,
14
23
author_email = "[email protected] " ,
15
24
description = (
Original file line number Diff line number Diff line change 23
23
import vhdeps .vhdl as vhdl
24
24
import vhdeps .target as targets
25
25
26
+ __version__ = '0.0.3'
27
+
26
28
def run_cli (args = None ):
27
29
"""Runs the vhdeps CLI. The command-line arguments are taken from `args`
28
30
when specified, or `sys.argv` by default. The return value is the exit code
You can’t perform that action at this time.
0 commit comments