Browse Source

use VERSION file to avoid importing gridlock before its installed

tags/release
Jan Petykiewicz 1 year ago
parent
commit
f62be35966
4 changed files with 14 additions and 3 deletions
  1. +1
    -0
      MANIFEST.in
  2. +1
    -0
      gridlock/VERSION
  3. +5
    -1
      gridlock/__init__.py
  4. +7
    -2
      setup.py

+ 1
- 0
MANIFEST.in View File

@@ -1,2 +1,3 @@
include README.md
include LICENSE.md
include gridlock/VERSION

+ 1
- 0
gridlock/VERSION View File

@@ -0,0 +1 @@
0.3

+ 5
- 1
gridlock/__init__.py View File

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

+ 7
- 2
setup.py View File

@@ -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…
Cancel
Save