forked from jan/mem_edit
		
	move version info into VERSION.py
This avoid needing custom spec files for pyinstaller, which doesn't handle package_data by default
This commit is contained in:
		
							parent
							
								
									0632b205ab
								
							
						
					
					
						commit
						9759645f92
					
				@ -1 +0,0 @@
 | 
			
		||||
0.4
 | 
			
		||||
							
								
								
									
										4
									
								
								mem_edit/VERSION.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mem_edit/VERSION.py
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,4 @@
 | 
			
		||||
""" VERSION defintion. THIS FILE IS MANUALLY PARSED BY setup.py and REQUIRES A SPECIFIC FORMAT """
 | 
			
		||||
__version__ = '''
 | 
			
		||||
0.4
 | 
			
		||||
'''
 | 
			
		||||
@ -12,16 +12,14 @@ To get started, try:
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
import platform
 | 
			
		||||
import pathlib
 | 
			
		||||
 | 
			
		||||
from .utils import MemEditError
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
__author__ = 'Jan Petykiewicz'
 | 
			
		||||
 | 
			
		||||
with open(pathlib.Path(__file__).parent / 'VERSION', 'r') as f:
 | 
			
		||||
    __version__ = f.read().strip()
 | 
			
		||||
version = __version__
 | 
			
		||||
from .VERSION import __version__
 | 
			
		||||
version = __version__       # legacy compatibility
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
system = platform.system()
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										6
									
								
								setup.py
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								setup.py
									
									
									
									
									
								
							@ -5,8 +5,8 @@ from setuptools import setup, find_packages
 | 
			
		||||
with open('README.md', 'r') as f:
 | 
			
		||||
    long_description = f.read()
 | 
			
		||||
 | 
			
		||||
with open('mem_edit/VERSION', 'r') as f:
 | 
			
		||||
    version = f.read().strip()
 | 
			
		||||
with open('mem_edit/VERSION.py', 'rt') as f:
 | 
			
		||||
    version = f.readlines()[2].strip()
 | 
			
		||||
 | 
			
		||||
setup(name='mem_edit',
 | 
			
		||||
      version=version,
 | 
			
		||||
@ -50,7 +50,7 @@ setup(name='mem_edit',
 | 
			
		||||
      ],
 | 
			
		||||
      packages=find_packages(),
 | 
			
		||||
      package_data={
 | 
			
		||||
          'mem_edit': ['VERSION']
 | 
			
		||||
          'mem_edit': []
 | 
			
		||||
      },
 | 
			
		||||
      install_requires=[
 | 
			
		||||
            'typing',
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user