avoid dependencies on package_data

__doc__ is handled poorly here; consider an alternate approach
master
Jan Petykiewicz 4 years ago
parent db23cc1d6f
commit f4afb06210

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

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

@ -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',

Loading…
Cancel
Save