move VERSION into a .py file that gets directly parsed by setup.py
avoids possible issues with pyinstaller
This commit is contained in:
parent
1b400605b1
commit
b9322be77f
@ -1 +0,0 @@
|
||||
2.2
|
4
masque/VERSION.py
Normal file
4
masque/VERSION.py
Normal file
@ -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
|
||||
|
7
setup.py
7
setup.py
@ -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…
Reference in New Issue
Block a user