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
|
import pathlib
|
||||||
|
|
||||||
|
from .VERSION import __version__
|
||||||
|
|
||||||
__author__ = 'Jan Petykiewicz'
|
__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:
|
try:
|
||||||
|
with open(pathlib.Path(__file__).parent.parent / 'README.md', 'r') as f:
|
||||||
__doc__ = f.read()
|
__doc__ = f.read()
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
|
7
setup.py
7
setup.py
@ -2,11 +2,12 @@
|
|||||||
|
|
||||||
from setuptools import setup, find_packages
|
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('meanas/VERSION', 'r') as f:
|
with open('meanas/VERSION.py', 'rt') as f:
|
||||||
version = f.read().strip()
|
version = f.readlines()[2].strip()
|
||||||
|
|
||||||
setup(name='meanas',
|
setup(name='meanas',
|
||||||
version=version,
|
version=version,
|
||||||
@ -18,7 +19,7 @@ setup(name='meanas',
|
|||||||
url='https://mpxd.net/code/jan/meanas',
|
url='https://mpxd.net/code/jan/meanas',
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
package_data={
|
package_data={
|
||||||
'meanas': ['VERSION']
|
'meanas': []
|
||||||
},
|
},
|
||||||
install_requires=[
|
install_requires=[
|
||||||
'numpy',
|
'numpy',
|
||||||
|
Loading…
Reference in New Issue
Block a user