Use VERSION.py instead of plain text VERSION

master
Jan Petykiewicz 3 years ago
parent 522b610209
commit e5e30a9414

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

@ -5,12 +5,7 @@ Module for rasterizing polygons, with float-precision anti-aliasing on
See the documentation for float_raster.raster(...) for details.
"""
import pathlib
from .VERSION import __version__
from .float_raster import *
__author__ = 'Jan Petykiewicz'
with open(pathlib.Path(__file__).parent / 'VERSION', 'r') as f:
__version__ = f.read().strip()

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

Loading…
Cancel
Save