Use VERSION.py instead of plain text VERSION
This commit is contained in:
parent
522b610209
commit
e5e30a9414
@ -1 +0,0 @@
|
|||||||
0.5
|
|
4
float_raster/VERSION.py
Normal file
4
float_raster/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.5
|
||||||
|
'''
|
@ -5,12 +5,7 @@ Module for rasterizing polygons, with float-precision anti-aliasing on
|
|||||||
See the documentation for float_raster.raster(...) for details.
|
See the documentation for float_raster.raster(...) for details.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import pathlib
|
from .VERSION import __version__
|
||||||
|
|
||||||
from .float_raster import *
|
from .float_raster import *
|
||||||
|
|
||||||
__author__ = 'Jan Petykiewicz'
|
__author__ = 'Jan Petykiewicz'
|
||||||
|
|
||||||
with open(pathlib.Path(__file__).parent / 'VERSION', 'r') as f:
|
|
||||||
__version__ = f.read().strip()
|
|
||||||
|
|
||||||
|
9
setup.py
9
setup.py
@ -2,11 +2,12 @@
|
|||||||
|
|
||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
|
|
||||||
|
|
||||||
with open('README.md', 'r') as f:
|
with open('README.md', 'r') as f:
|
||||||
long_description = f.read()
|
long_description = f.read()
|
||||||
|
|
||||||
with open('float_raster/VERSION', 'r') as f:
|
with open('float_raster/VERSION.py', 'rt') as f:
|
||||||
version = f.read().strip()
|
version = f.readlines()[2].strip()
|
||||||
|
|
||||||
setup(name='float_raster',
|
setup(name='float_raster',
|
||||||
version=version,
|
version=version,
|
||||||
@ -18,9 +19,7 @@ setup(name='float_raster',
|
|||||||
url='https://mpxd.net/code/jan/float_raster',
|
url='https://mpxd.net/code/jan/float_raster',
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
package_data={
|
package_data={
|
||||||
'float_raster': ['VERSION',
|
'float_raster': ['py.typed']
|
||||||
'py.typed',
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
install_requires=[
|
install_requires=[
|
||||||
'numpy',
|
'numpy',
|
||||||
|
Loading…
Reference in New Issue
Block a user