avoid dependencies on package_data

__doc__ is handled poorly here; consider an alternate approach
This commit is contained in:
Jan Petykiewicz 2020-11-03 01:12:27 -08:00
parent db23cc1d6f
commit f4afb06210
4 changed files with 15 additions and 8 deletions

View File

@ -1 +0,0 @@
0.6

4
meanas/VERSION.py Normal file
View File

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

View File

@ -6,11 +6,14 @@ See the readme or `import meanas; help(meanas)` for more info.
import pathlib
from .VERSION import __version__
__author__ = 'Jan Petykiewicz'
with open(pathlib.Path(__file__).parent / 'VERSION', 'r') as f:
__version__ = f.read().strip()
with open(pathlib.Path(__file__).parent.parent / 'README.md', 'r') as f:
__doc__ = f.read()
try:
with open(pathlib.Path(__file__).parent.parent / 'README.md', 'r') as f:
__doc__ = f.read()
except Exception:
pass

View File

@ -2,11 +2,12 @@
from setuptools import setup, find_packages
with open('README.md', 'r') as f:
long_description = f.read()
with open('meanas/VERSION', 'r') as f:
version = f.read().strip()
with open('meanas/VERSION.py', 'rt') as f:
version = f.readlines()[2].strip()
setup(name='meanas',
version=version,
@ -18,7 +19,7 @@ setup(name='meanas',
url='https://mpxd.net/code/jan/meanas',
packages=find_packages(),
package_data={
'meanas': ['VERSION']
'meanas': []
},
install_requires=[
'numpy',