Use VERSION.py instead of plain VERSION
reduce dependence on package_data
This commit is contained in:
parent
db6819ccc6
commit
4e0a5ede21
@ -1 +0,0 @@
|
|||||||
0.4
|
|
4
gridlock/VERSION.py
Normal file
4
gridlock/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.4
|
||||||
|
'''
|
@ -15,15 +15,11 @@ Dependencies:
|
|||||||
- mpl_toolkits.mplot3d [Grid.visualize_isosurface()]
|
- mpl_toolkits.mplot3d [Grid.visualize_isosurface()]
|
||||||
- skimage [Grid.visualize_isosurface()]
|
- skimage [Grid.visualize_isosurface()]
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import pathlib
|
|
||||||
|
|
||||||
from .error import GridError
|
from .error import GridError
|
||||||
from .direction import Direction
|
from .direction import Direction
|
||||||
from .grid import Grid
|
from .grid import Grid
|
||||||
|
|
||||||
__author__ = 'Jan Petykiewicz'
|
__author__ = 'Jan Petykiewicz'
|
||||||
|
|
||||||
with open(pathlib.Path(__file__).parent / 'VERSION', 'r') as f:
|
from .VERSION import __version__
|
||||||
__version__ = f.read().strip()
|
|
||||||
version = __version__
|
version = __version__
|
||||||
|
6
setup.py
6
setup.py
@ -5,8 +5,8 @@ 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('gridlock/VERSION', 'r') as f:
|
with open('gridlock/VERSION.py', 'rt') as f:
|
||||||
version = f.read().strip()
|
version = f.readlines()[2].strip()
|
||||||
|
|
||||||
setup(name='gridlock',
|
setup(name='gridlock',
|
||||||
version=version,
|
version=version,
|
||||||
@ -18,7 +18,7 @@ setup(name='gridlock',
|
|||||||
url='https://mpxd.net/code/jan/gridlock',
|
url='https://mpxd.net/code/jan/gridlock',
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
package_data={
|
package_data={
|
||||||
'gridlock': ['VERSION']
|
'gridlock': [],
|
||||||
},
|
},
|
||||||
install_requires=[
|
install_requires=[
|
||||||
'numpy',
|
'numpy',
|
||||||
|
Loading…
Reference in New Issue
Block a user