Add make/setup files. Move source into a subdirectory.

This commit is contained in:
Durham Goode 2013-06-12 13:42:44 -07:00
parent 7d592e55d3
commit 78ce8beeb3
10 changed files with 46 additions and 1 deletions

View File

@ -1 +1,4 @@
.*\.pyc syntax: regexp
\.pyc$
\.so$
^build/

24
Makefile Normal file
View File

@ -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 '{}' ';'

18
setup.py Normal file
View File

@ -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 = []
)