Checkpoint while refactoring the fetch package

parent 11bc1392
......@@ -19,7 +19,9 @@
# You should have received a copy of the GNU General Public License
# along with Hdlmake. If not, see <http://www.gnu.org/licenses/>.
from .constants import (GIT, SVN, LOCAL, fetch_type_lookup)
"""This package provides stuff to handle local and remote repositories"""
from .constants import (GIT, SVN, LOCAL, FETCH_TYPE_LOOKUP)
from .git import Git
from .svn import Svn
from .backend_factory import BackendFactory
......@@ -22,6 +22,9 @@
# Note that the order here is important. The constants must be
# defined first! If they are not, there will likely be an obscure error
# when doing the imports within the imports that come afterwards.
"""Module providing the constants required for the fetch process"""
GIT = 1
SVN = 2
LOCAL = 3
......@@ -35,7 +38,7 @@ from .backend_factory import BackendFactory
# Initialize an instance of BackendFactory which will be made publicly
# available
fetch_type_lookup = BackendFactory()
fetch_type_lookup.register_backend(GIT, Git)
fetch_type_lookup.register_backend(SVN, Svn)
fetch_type_lookup.register_backend(LOCAL, Local)
FETCH_TYPE_LOOKUP = BackendFactory()
FETCH_TYPE_LOOKUP.register_backend(GIT, Git)
FETCH_TYPE_LOOKUP.register_backend(SVN, Svn)
FETCH_TYPE_LOOKUP.register_backend(LOCAL, Local)
......@@ -19,8 +19,12 @@
# You should have received a copy of the GNU General Public License
# along with Hdlmake. If not, see <http://www.gnu.org/licenses/>.
"""Module providing the base class for the different code fetchers"""
class Fetcher(object):
"""Base class for the code fetcher objects"""
def fetch(self, module):
"""Stub method, this must be implemented by the code fetcher"""
pass
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