summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--_version.py21
-rw-r--r--lps_gen.py3
-rw-r--r--setup.py15
3 files changed, 35 insertions, 4 deletions
diff --git a/_version.py b/_version.py
new file mode 100644
index 0000000..1869878
--- /dev/null
+++ b/_version.py
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2015 lpschedule-generator contributors. See CONTRIBUTORS.
+#
+# This file is part of lpschedule-generator.
+#
+# lpschedule-generator is free software: you can redistribute it
+# and/or modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation, either version 3 of
+# the License, or (at your option) any later version.
+#
+# lpschedule-generator is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with lpschedule-generator (see COPYING). If not, see
+# <http://www.gnu.org/licenses/>.
+
+__version__ = '0.3.2.dev'
diff --git a/lps_gen.py b/lps_gen.py
index ccb7f11..56fd15e 100644
--- a/lps_gen.py
+++ b/lps_gen.py
@@ -31,7 +31,8 @@ from jinja2.exceptions import TemplateNotFound
from mistune import Renderer, Markdown
from unidecode import unidecode
-__version__ = '0.3.1'
+from _version import __version__
+
# unicode magic
reload(sys)
diff --git a/setup.py b/setup.py
index d10e61d..e44de21 100644
--- a/setup.py
+++ b/setup.py
@@ -19,16 +19,25 @@
# along with lpschedule-generator (see COPYING). If not, see
# <http://www.gnu.org/licenses/>.
-import lps_gen
+import _version
from setuptools import setup, find_packages
+def readf(filename):
+ content = ''
+ try:
+ with open(filename, 'rb') as f:
+ for line in f:
+ content = content + line
+ except IOError:
+ print "Error: unable to open %s" % filename
+ return content
config = {
'name': 'lpschedule-generator',
'description': 'LibrePlanet schedule generator',
- 'long_description': lps_gen.read_file('README.rst'),
- 'version': lps_gen.__version__,
+ 'long_description': readf('README.rst'),
+ 'version': _version.__version__,
'platforms': 'GNU/Linux',
'license': 'GNU General Public License version 3 or later',
'url': 'https://notabug.org/rsd/lpschedule-generator/',