aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fg21sim/__init__.py23
-rwxr-xr-xsetup.py8
2 files changed, 29 insertions, 2 deletions
diff --git a/fg21sim/__init__.py b/fg21sim/__init__.py
index f4633fa..38cb565 100644
--- a/fg21sim/__init__.py
+++ b/fg21sim/__init__.py
@@ -1 +1,22 @@
-from .core import hmm \ No newline at end of file
+"""
+Realistic Foregrounds Simulation for EoR 21cm Signal Detection
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+:copyright: (c) 2016 Weitian LI
+:license: MIT
+"""
+
+__title__ = "fg21sim"
+__version__ = "0.0.1"
+__author__ = "Weitian LI"
+__license__ = "MIT"
+__copyright__ = "Copyright (c) 2016 Weitian LI"
+
+
+from .core import hmm
+
+# Set default logging handle to avoid "No handler found" warnings.
+import logging
+from logging import NullHandler
+
+logging.getLogger(__name__).addHandler(NullHandler())
diff --git a/setup.py b/setup.py
index dc40675..a0ca71f 100755
--- a/setup.py
+++ b/setup.py
@@ -1,9 +1,15 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
+import re
+
from setuptools import setup, find_packages
+with open('fg21sim/__init__.py') as f:
+ version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
+ f.read(), re.MULTILINE).group(1)
+
with open('README.rst') as f:
readme = f.read()
@@ -12,7 +18,7 @@ with open('LICENSE') as f:
setup(
name='fg21sim',
- version='0.0.1',
+ version=version,
description='Realistic Foregrounds Simulation for EoR 21cm Signal Detection',
long_description=readme,
author='Weitian LI',