forked from scientific-python/cookie
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.py
More file actions
28 lines (15 loc) · 707 Bytes
/
__init__.py
File metadata and controls
28 lines (15 loc) · 707 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
"""Copyright (c) {{ cookiecutter.__year }} {{ cookiecutter.full_name }}. All rights reserved.
{{ cookiecutter.project_name }}: {{ cookiecutter.project_short_description }}
"""
from __future__ import annotations
{%- if cookiecutter.backend in ["pybind11", "hatch", "skbuild", "setuptools", "flit"] and cookiecutter.vcs %}
from ._version import version as __version__
{%- elif cookiecutter.backend == "pdm" and cookiecutter.vcs %}
import importlib.metadata
__version__ = importlib.metadata.version("{{ cookiecutter.__project_slug }}")
{%- elif cookiecutter.backend == "poetry" and cookiecutter.vcs %}
__version__ = "0.0.0"
{%- else %}
__version__ = "0.1.0"
{%- endif %}
__all__ = ["__version__"]