Browse Source

initial commit

master
Brett Langdon 11 years ago
parent
commit
2ce64de6c3
6 changed files with 31 additions and 2 deletions
  1. +0
    -0
      MANIFEST.in
  2. +2
    -2
      README.md
  3. +29
    -0
      buildparser.py
  4. +0
    -0
      requirements.txt
  5. +0
    -0
      setup.cfg
  6. +0
    -0
      setup.py

+ 0
- 0
MANIFEST.in View File


+ 2
- 2
README.md View File

@ -1,4 +1,4 @@
buildparser
BuildParser
===========
Python package for parsing a build spec(s) from a config file
A specification and parser for project build configuration.

+ 29
- 0
buildparser.py View File

@ -0,0 +1,29 @@
__version__ = "0.1.0"
import os
PERMITTED_EXTENSIONS = ["yml", "json"]
def parse(directory=None, name="build"):
if directory is None:
directory = os.getcwd()
else:
directory = os.path.abspath(directory)
dir_name = os.path.join(directory, ".%s" % (name, ))
if os.path.exists(dir_name):
return parse_directory(dir_name)
for ext in PERMITTED_EXTENSIONS:
file_name = os.path.join(directory, ".%s.%s" % (name, ext))
if os.path.exists(file_name):
return parse_file(file_name)
def parse_directory(dir_name):
pass
def parse_file(file_name):
pass

+ 0
- 0
requirements.txt View File


+ 0
- 0
setup.cfg View File


+ 0
- 0
setup.py View File


Loading…
Cancel
Save