Browse Source

Use VERSION.py instead of plain text VERSION

master
Jan Petykiewicz 11 months ago
parent
commit
e5e30a9414
  1. 1
      float_raster/VERSION
  2. 4
      float_raster/VERSION.py
  3. 7
      float_raster/__init__.py
  4. 9
      setup.py

1
float_raster/VERSION

@ -1 +0,0 @@
0.5

4
float_raster/VERSION.py

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

7
float_raster/__init__.py

@ -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()

9
setup.py

@ -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