move VERSION into a .py file that gets directly parsed by setup.py

avoids possible issues with pyinstaller
lethe/HEAD
Jan Petykiewicz 4 years ago
parent 1b400605b1
commit b9322be77f

@ -0,0 +1,4 @@
""" VERSION defintion. THIS FILE IS MANUALLY PARSED BY setup.py and REQUIRES A SPECIFIC FORMAT """
__version__ = '''
2.2
'''

@ -17,8 +17,6 @@
otherwise noted, assume that arguments are stored by-reference.
"""
import pathlib
from .error import PatternError, PatternLockedError
from .shapes import Shape
from .label import Label
@ -30,6 +28,5 @@ from .library import Library
__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

@ -6,8 +6,8 @@ from setuptools import setup, find_packages
with open('README.md', 'r') as f:
long_description = f.read()
with open('masque/VERSION', 'r') as f:
version = f.read().strip()
with open('masque/VERSION.py', 'rt') as f:
version = f.readlines()[2].strip()
setup(name='masque',
version=version,
@ -19,8 +19,7 @@ setup(name='masque',
url='https://mpxd.net/code/jan/masque',
packages=find_packages(),
package_data={
'masque': ['VERSION',
'py.typed',
'masque': ['py.typed',
]
},
install_requires=[

Loading…
Cancel
Save