Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate the build system to pyproject.toml #252

Merged
merged 5 commits into from
Nov 26, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update __init__.py to import the correct version file
  • Loading branch information
tanghaibao committed Nov 26, 2022
commit 17e036e72c143d21c3079c82d890cc1eea35567c
27 changes: 17 additions & 10 deletions goatools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
from __future__ import absolute_import

#### # make the module mportable
#### from goatools.go_enrichment import *
#### from . import multiple_testing
#### from . import obo_parser
from datetime import datetime
from pkg_resources import get_distribution, DistributionNotFound

__author__ = ("Haibao Tang", "DV Klopfenstein")
__copyright__ = "Copyright (C) 2009-present, Haibao Tang, DV Klopfenstein"
__copyright__ = "Copyright (C) 2009-{}, Haibao Tang, DV Klopfenstein".format(
datetime.now().year
)
__email__ = "[email protected]"
__license__ = "BSD"
__status__ = "Development"

from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
try:
VERSION = get_distribution(__name__).version
except DistributionNotFound: # pragma: no cover
try:
from .version import version as VERSION # noqa
except ImportError: # pragma: no cover
raise ImportError(
"Failed to find (autogenerated) version.py. "
"This might be because you are installing from GitHub's tarballs, "
"use the PyPI ones."
)
__version__ = VERSION