From 534f8a43d74f486629f5046021792868bee2a06a Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Thu, 30 May 2013 15:55:01 -0300 Subject: Add comment filter for the requirements parser - filter comments for the result - add licence - remove unused comment --- pkg/utils.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'pkg') 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 . + """ 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 -- cgit v1.2.3