diff --git a/.hgignore b/.hgignore index 355a6c951b..05f5bf6e3a 100644 --- a/.hgignore +++ b/.hgignore @@ -1 +1,4 @@ -.*\.pyc \ No newline at end of file +syntax: regexp +\.pyc$ +\.so$ +^build/ \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..44ab3bcd9c --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +PYTHON=python + +.PHONY: tests + +PREFIX=/usr/local + +help: + @echo 'Commonly used make targets:' + @echo ' local - build for inplace use' + @echo ' install - install program and man pages to PREFIX ($(PREFIX))' + @echo ' clean - remove files created by other targets' + @echo ' (except installed files or dist source tarball)' + +local: + $(PYTHON) setup.py \ + build_py -c -d . \ + build_ext -i + +install: + $(PYTHON) setup.py $(PURE) install --prefix="$(PREFIX)" --force + +clean: + -$(PYTHON) setup.py clean --all # ignore errors from this command + find . \( -name '*.py[cdo]' -o -name '*.so' \) -exec rm -f '{}' ';' diff --git a/__init__.py b/hgshallowrepo/__init__.py similarity index 100% rename from __init__.py rename to hgshallowrepo/__init__.py diff --git a/fileserverclient.py b/hgshallowrepo/fileserverclient.py similarity index 100% rename from fileserverclient.py rename to hgshallowrepo/fileserverclient.py diff --git a/remotefilectx.py b/hgshallowrepo/remotefilectx.py similarity index 100% rename from remotefilectx.py rename to hgshallowrepo/remotefilectx.py diff --git a/remotefilelog.py b/hgshallowrepo/remotefilelog.py similarity index 100% rename from remotefilelog.py rename to hgshallowrepo/remotefilelog.py diff --git a/shallowbundle.py b/hgshallowrepo/shallowbundle.py similarity index 100% rename from shallowbundle.py rename to hgshallowrepo/shallowbundle.py diff --git a/shallowrepo.py b/hgshallowrepo/shallowrepo.py similarity index 100% rename from shallowrepo.py rename to hgshallowrepo/shallowrepo.py diff --git a/shallowstore.py b/hgshallowrepo/shallowstore.py similarity index 100% rename from shallowstore.py rename to hgshallowrepo/shallowstore.py diff --git a/setup.py b/setup.py new file mode 100644 index 0000000000..88d56bcb81 --- /dev/null +++ b/setup.py @@ -0,0 +1,18 @@ +from distutils.core import setup, Extension + +setup( + name='hgshallowrepo', + version='0.1', + author='Durham Goode', + maintainer='Durham Goode', + maintainer_email='durham@fb.com', + url='https://bitbucket.org/facebook/hgshallowrepo', + description='Shallow repo extension for Mercurial', + long_description=""" +This extension adds support for shallow repositories in Mercurial where all the file history is stored remotely. + """.strip(), + keywords='hg shallow mercurial', + license='Not determined yet', + packages=['hgshallowrepo'], + ext_modules = [] +)