avoid dependencies on package_data
__doc__ is handled poorly here; consider an alternate approach
This commit is contained in:
parent
db23cc1d6f
commit
f4afb06210
@ -1 +0,0 @@
|
||||
0.6
|
4
meanas/VERSION.py
Normal file
4
meanas/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.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()
|
||||
|
||||
try:
|
||||
with open(pathlib.Path(__file__).parent.parent / 'README.md', 'r') as f:
|
||||
__doc__ = f.read()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
7
setup.py
7
setup.py
@ -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…
Reference in New Issue
Block a user