use VERSION file to avoid importing gridlock before its installed
This commit is contained in:
parent
e97bd482a9
commit
f62be35966
@ -1,2 +1,3 @@
|
||||
include README.md
|
||||
include LICENSE.md
|
||||
include gridlock/VERSION
|
||||
|
1
gridlock/VERSION
Normal file
1
gridlock/VERSION
Normal file
@ -0,0 +1 @@
|
||||
0.3
|
@ -16,10 +16,14 @@ Dependencies:
|
||||
- skimage [Grid.visualize_isosurface()]
|
||||
"""
|
||||
|
||||
import pathlib
|
||||
|
||||
from .error import GridError
|
||||
from .direction import Direction
|
||||
from .grid import Grid
|
||||
|
||||
__author__ = 'Jan Petykiewicz'
|
||||
|
||||
version = '0.3'
|
||||
with open(pathlib.Path(__file__).parent / 'VERSION', 'r') as f:
|
||||
__version__ = f.read().strip()
|
||||
version = __version__
|
||||
|
9
setup.py
9
setup.py
@ -1,13 +1,15 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from setuptools import setup, find_packages
|
||||
import gridlock
|
||||
|
||||
with open('README.md', 'r') as f:
|
||||
long_description = f.read()
|
||||
|
||||
with open('gridlock/VERSION', 'r') as f:
|
||||
version = f.read().strip()
|
||||
|
||||
setup(name='gridlock',
|
||||
version=gridlock.version,
|
||||
version=version,
|
||||
description='Coupled gridding library',
|
||||
long_description=long_description,
|
||||
long_description_content_type='text/markdown',
|
||||
@ -15,6 +17,9 @@ setup(name='gridlock',
|
||||
author_email='anewusername@gmail.com',
|
||||
url='https://mpxd.net/code/jan/gridlock',
|
||||
packages=find_packages(),
|
||||
package_data={
|
||||
'gridlock': ['VERSION']
|
||||
},
|
||||
install_requires=[
|
||||
'numpy',
|
||||
'float_raster',
|
||||
|
Loading…
Reference in New Issue
Block a user