File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 33from .RDF_generator import RDFGenerator
44
55
6- __version__ = "0.1.0 "
6+ __version__ = "0.2.1 "
Original file line number Diff line number Diff line change 1+ from pathlib import Path
2+ import re
13from setuptools import setup , find_packages
24import os
35
6+ def get_version ():
7+ """Reads the version from your_package/__init__.py"""
8+ init_py = Path (__file__ ).parent .joinpath ("semantic_iot" , "__init__.py" )
9+ with open (init_py , "r" ) as f :
10+ content = f .read ()
11+ # Using a regular expression to find the version string
12+ match = re .search (r"^__version__\s*=\s*['\"]([^'\"]*)['\"]" , content , re .M )
13+ if match :
14+ return match .group (1 )
15+ raise RuntimeError ("Unable to find version string." )
416
517# Utility function to read the README file.
618def read_long_description ():
@@ -26,7 +38,7 @@ def read_requirements():
2638
2739setup (
2840 name = 'semantic_iot' ,
29- version = '0.1.0' , # Update the version as needed
41+ version = get_version (),
3042 author = 'Junsong Du' ,
31433244 description = 'A semantic framework to enhence interoperability cross different '
You can’t perform that action at this time.
0 commit comments