summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@yahoo.com.ar>2013-05-30 15:55:01 -0300
committerIvan Alejandro <ivanalejandro0@yahoo.com.ar>2013-06-03 15:51:57 -0300
commit534f8a43d74f486629f5046021792868bee2a06a (patch)
tree660e025a3289dfa95c1865f23a29f60902e9ef76 /pkg
parentf59db5457489606a6e12843c9e71911a1dbc54ff (diff)
Add comment filter for the requirements parser
- filter comments for the result - add licence - remove unused comment
Diffstat (limited to 'pkg')
-rw-r--r--pkg/utils.py22
1 files changed, 21 insertions, 1 deletions
diff --git a/pkg/utils.py b/pkg/utils.py
index 5090f2bd..deace14b 100644
--- a/pkg/utils.py
+++ b/pkg/utils.py
@@ -1,6 +1,24 @@
+# -*- coding: utf-8 -*-
+# utils.py
+# Copyright (C) 2013 LEAP
+#
+# This program 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.
+#
+# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
"""
Utils to help in the setup process
"""
+
import os
import re
import sys
@@ -56,9 +74,11 @@ def parse_requirements(reqfiles=['requirements.txt',
pass
elif line == 'PySide' and skip_pyside:
pass
+ # do not include comments
+ elif line.lstrip().startswith('#'):
+ pass
else:
if line != '':
requirements.append(line)
- #print 'REQUIREMENTS', requirements
return requirements