Add stix2.__version__
							parent
							
								
									9bfc240008
								
							
						
					
					
						commit
						6f680be8a6
					
				
							
								
								
									
										12
									
								
								setup.py
								
								
								
								
							
							
						
						
									
										12
									
								
								setup.py
								
								
								
								
							|  | @ -1,6 +1,16 @@ | |||
| #!/usr/bin/env python | ||||
| from setuptools import find_packages, setup | ||||
| 
 | ||||
| 
 | ||||
| def get_version(): | ||||
|     with open('stix2/version.py') as f: | ||||
|         for line in f.readlines(): | ||||
|             if line.startswith("__version__"): | ||||
|                 version = line.split()[-1].strip('"') | ||||
|                 return version | ||||
|         raise AttributeError("Package does not have a __version__") | ||||
| 
 | ||||
| 
 | ||||
| install_requires = [ | ||||
|     'pytz', | ||||
|     'six', | ||||
|  | @ -11,7 +21,7 @@ install_requires = [ | |||
| setup( | ||||
|     name='stix2', | ||||
|     description="Produce and consume STIX 2 JSON content", | ||||
|     version='0.2.0', | ||||
|     version=get_version(), | ||||
|     packages=find_packages(), | ||||
|     install_requires=install_requires, | ||||
|     keywords="stix stix2 json cti cyber threat intelligence", | ||||
|  |  | |||
|  | @ -23,6 +23,7 @@ from .sdo import (AttackPattern, Campaign, CourseOfAction, Identity, Indicator, | |||
|                   Tool, Vulnerability) | ||||
| from .sro import Relationship, Sighting | ||||
| from .utils import get_dict | ||||
| from .version import __version__ | ||||
| 
 | ||||
| OBJ_MAP = { | ||||
|     'attack-pattern': AttackPattern, | ||||
|  |  | |||
|  | @ -0,0 +1 @@ | |||
| __version__ = "0.2.0" | ||||
		Loading…
	
		Reference in New Issue
	
	 clenk
						clenk