-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added test for empty parse - Added version info - Added setup.py - Added parser that always returns empty
- Loading branch information
1 parent
0a0e4d7
commit 168d8c1
Showing
5 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from .parser import parse | ||
|
||
_MAJOR = 0 | ||
_MINOR = 0 | ||
_PATCH = 1 | ||
|
||
def version_tuple(): | ||
''' | ||
Returns a 3-tuple of ints that represent the version | ||
''' | ||
return (_MAJOR, _MINOR, _PATCH) | ||
|
||
def version(): | ||
''' | ||
Returns a string representation of the version | ||
''' | ||
return '%d.%d.%d' %(version_tuple()) | ||
|
||
|
||
__version__ = version() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
def parse(reqstr): | ||
if not isinstance(reqstr, basestring): | ||
reqstr = reqstr.read() | ||
|
||
return [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
try: | ||
from setuptools import setup | ||
except ImportError: | ||
from distutils.core import setup | ||
|
||
long_description = open('README.rst').read() | ||
|
||
setup( | ||
name = 'reqfile-parser', | ||
version = '0.0.1', | ||
description = 'Parses Pip requirement files', | ||
long_description = long_description, | ||
author = 'David Fischer', | ||
author_email = '[email protected]', | ||
url = 'https://github.com/davidfischer/reqfile-parser', | ||
license = 'BSD', | ||
platforms = ['OS Independent'], | ||
packages = ['reqfileparser'], | ||
classifiers = [ | ||
'Development Status :: 4 - Beta', | ||
'Intended Audience :: Developers', | ||
'License :: OSI Approved :: BSD License', | ||
'Operating System :: OS Independent', | ||
'Programming Language :: Python', | ||
'Programming Language :: Python :: 2.6', | ||
'Programming Language :: Python :: 2.7', | ||
'Topic :: Software Development :: Libraries :: Python Modules', | ||
], | ||
test_suite='tests', | ||
) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import unittest | ||
from reqfileparser import parse | ||
|
||
class TestParser(unittest.TestCase): | ||
def test_empty(self): | ||
self.assertEqual(parse(''), []) | ||
|