Use VERSION.py instead of plain VERSION
reduces reliance on package_data
This commit is contained in:
parent
e684669f8e
commit
288952f961
@ -1 +0,0 @@
|
|||||||
0.3
|
|
4
klamath/VERSION.py
Normal file
4
klamath/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.3
|
||||||
|
'''
|
@ -27,16 +27,12 @@ The goal is to keep this library simple:
|
|||||||
tools for working with hierarchical design data and supports multiple
|
tools for working with hierarchical design data and supports multiple
|
||||||
file formats.
|
file formats.
|
||||||
"""
|
"""
|
||||||
import pathlib
|
|
||||||
|
|
||||||
from . import basic
|
from . import basic
|
||||||
from . import record
|
from . import record
|
||||||
from . import records
|
from . import records
|
||||||
from . import elements
|
from . import elements
|
||||||
from . import library
|
from . import library
|
||||||
|
|
||||||
|
from .VERSION import __version__
|
||||||
|
|
||||||
__author__ = 'Jan Petykiewicz'
|
__author__ = 'Jan Petykiewicz'
|
||||||
|
|
||||||
with open(pathlib.Path(__file__).parent / 'VERSION', 'r') as f:
|
|
||||||
__version__ = f.read().strip()
|
|
||||||
|
8
setup.py
8
setup.py
@ -6,8 +6,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('klamath/VERSION', 'r') as f:
|
with open('klamath/VERSION.py', 'rt') as f:
|
||||||
version = f.read().strip()
|
version = f.readlines()[2].strip()
|
||||||
|
|
||||||
setup(name='klamath',
|
setup(name='klamath',
|
||||||
version=version,
|
version=version,
|
||||||
@ -19,9 +19,7 @@ setup(name='klamath',
|
|||||||
url='https://mpxd.net/code/jan/klamath',
|
url='https://mpxd.net/code/jan/klamath',
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
package_data={
|
package_data={
|
||||||
'klamath': ['VERSION',
|
'klamath': ['py.typed'],
|
||||||
'py.typed',
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
install_requires=[
|
install_requires=[
|
||||||
'numpy',
|
'numpy',
|
||||||
|
Loading…
Reference in New Issue
Block a user