Skip to content

Commit 10841e5

Browse files
committed
added version.txt file to get version number
1 parent 2d14842 commit 10841e5

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@
2626
include README.md
2727
include setup.cfg
2828
include LICENSE
29+
include truecallerpy/version.txt

setup.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@
2828

2929
from setuptools import Command, find_packages, setup
3030

31-
version = "0.0.12"
32-
3331
this_dir = abspath(dirname(__file__))
32+
33+
with open(join(this_dir, "truecallerpy","version.txt"), encoding='utf-8') as versionFile:
34+
version = versionFile.read()
35+
3436
with open(join(this_dir, 'README.md'), encoding='utf-8') as file:
3537
long_description = file.read()
3638

truecallerpy/version.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,14 @@
2222
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2323
# SOFTWARE.
2424
#====================================================================================
25+
from codecs import open
26+
from os.path import abspath, dirname, join
2527

2628
def truecallerpy_info():
27-
version = "0.0.12"
29+
this_dir = abspath(dirname(__file__))
30+
31+
with open(join(this_dir,"version.txt"), encoding='utf-8') as versionFile:
32+
version = versionFile.read()
2833
data = '''
2934
truecallerpy
3035
Version : {}
@@ -35,3 +40,5 @@ def truecallerpy_info():
3540
License : MIT
3641
'''.format(version)
3742
return data
43+
44+
# print(truecallerpy_info())

truecallerpy/version.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.0.13

0 commit comments

Comments
 (0)