Commit 4efbc491 by Timothée Peignier

move Versionning class

parent 1f218765
class VersioningBase(object):
def get_version(self, source_files):
raise NotImplementedError
def needs_update(self, output_file, source_files, version):
raise NotImplementedError
class VersioningError(Exception):
"""This exception is raised when version creation fails"""
pass
class VersioningBase(object):
def get_version(self, source_files):
raise NotImplementedError
def needs_update(self, output_file, source_files, version):
raise NotImplementedError
class VersioningError(Exception):
"""This exception is raised when version creation fails"""
pass
from compress.conf import settings
from compress.utils import get_output_filename, get_hexdigest, compress_source
from compress.versioning.base import VersioningBase, VersioningError
from compress.versioning import VersioningBase, VersioningError
try:
import git
......
......@@ -3,7 +3,7 @@ from hashlib import md5, sha1
from compress.conf import settings
from compress.utils import concat, get_output_filename
from compress.versioning.base import VersioningBase
from compress.versioning import VersioningBase
class HashVersioningBase(VersioningBase):
......
import os
from compress.utils import get_output_filename, compress_source, compress_root
from compress.versioning.base import VersioningBase
from compress.versioning import VersioningBase
class MTimeVersioning(VersioningBase):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment