forked from benda/packagehowto
package version section
This commit is contained in:
@@ -4,6 +4,19 @@
|
||||
Fancy numerics made easy.
|
||||
"""
|
||||
|
||||
|
||||
__version__ = '1.4.2'
|
||||
""" Current version of the numerix package as string 'x.y.z'. """
|
||||
|
||||
__year__ = '2024'
|
||||
""" Year of the current numerix version as string. """
|
||||
|
||||
# Add them to documentation:
|
||||
__pdoc__ = {}
|
||||
__pdoc__['__version__'] = True
|
||||
__pdoc__['__year__'] = True
|
||||
|
||||
|
||||
# Functions defined directly in __init__.py can be imported directly
|
||||
# from the package (e.g. from numerix import add_four):
|
||||
def add_four(x):
|
||||
@@ -25,4 +38,3 @@ def add_four(x):
|
||||
# Functions from the modules of the package can be imported into the
|
||||
# namespace of the package:
|
||||
from .addition import add_two
|
||||
from .version import __version__
|
||||
|
||||
@@ -1,6 +1,2 @@
|
||||
def add_two(x):
|
||||
return x + 2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
from .__init__ import __version__
|
||||
from .addition import add_two
|
||||
|
||||
|
||||
def three():
|
||||
return add_two(1)
|
||||
|
||||
|
||||
def about():
|
||||
print(f'{__name__} {__version__}')
|
||||
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
""" Version and year of the numerix package.
|
||||
"""
|
||||
|
||||
__version__ = '1.4.2'
|
||||
""" Current version of the numerix package as string 'x.y.z'. """
|
||||
|
||||
__year__ = '2024'
|
||||
""" Year of the current numerix version as string. """
|
||||
|
||||
# Add them to documentation:
|
||||
__pdoc__ = {}
|
||||
__pdoc__['__version__'] = True
|
||||
__pdoc__['__year__'] = True
|
||||
|
||||
Reference in New Issue
Block a user